Two-dimensional (2D) materials offer a promising platform for exploring condensed matter phenomena and developing technological applications. However, the reduction of material dimensions to the atomic scale poses a challenge for traditional measurement and interfacing techniques that typically couple to macroscopic observables. We demonstrate a method for probing the properties of 2D materials via nanometer-scale nuclear quadrupole resonance (NQR) spectroscopy using individual atomlike impurities in diamond. Coherent manipulation of shallow nitrogen-vacancy (NV) color centers enables the probing of nanoscale ensembles down to approximately 30 nuclear spins in atomically thin hexagonal boron nitride (h-BN). The characterization of low-dimensional nanoscale materials could enable the development of new quantum hybrid systems, combining atomlike systems coherently coupled with individual atoms in 2D materials.