Optically detected nuclear magnetic resonance (NMR) with micrometer resolution is demonstrated in n-GaAs using an on-chip microcoil. To trace the Overhauser field, the electron Larmor frequency is monitored via time-resolved magneto-optical Kerr rotation. Sweeping the frequency of the rf magnetic field induced by an on-chip microscale current loop, nuclear spin depolarization is achieved for each isotope species. The experimental data indicate an impact of a local quadrupole field, most likely caused by ionized donors, on the amplitude and linewidth of the NMR spectrum. By applying rf pulse sequences, the Rabi oscillation of A75s nuclear spins is obtained with an effective dephasing time of ∼200 μs.