Nuclear magnetic resonance spectroscopy is a powerful tool for the structural analysis of organic compounds and biomolecules but typically requires macroscopic sample quantities. We use a sensor, which consists of two quantum bits corresponding to an electronic spin and an ancillary nuclear spin, to demonstrate room temperature magnetic resonance detection and spectroscopy of multiple nuclear species within individual ubiquitin proteins attached to the diamond surface. Using quantum logic to improve readout fidelity and a surface-treatment technique to extend the spin coherence time of shallow nitrogen-vacancy centers, we demonstrate magnetic field sensitivity sufficient to detect individual proton spins within 1 second of integration. This gain in sensitivity enables high-confidence detection of individual proteins and allows us to observe spectral features that reveal information about their chemical composition.