Determining atomic-level characteristics of molecules on two-dimensional surfaces is one of the fundamental challenges in chemistry. High-resolution nuclear magnetic resonance (NMR) could deliver rich structural information, but its application to two-dimensional materials has been prevented by intrinsically low sensitivity. Here we obtain high-resolution one- and two-dimensional 31P NMR spectra from as little as 160 picomoles of oligonucleotide functionalities deposited onto silicate glass and sapphire wafers. This is enabled by a factor >105 improvement in sensitivity compared to typical NMR approaches from combining dynamic nuclear polarization methods, multiple-echo acquisition, and optimized sample formulation. We demonstrate that, with this ultrahigh NMR sensitivity, 31P NMR can be used to observe DNA bound to miRNA, to sense conformational changes due to ion binding, and to follow photochemical degradation reactions.