We demonstrate optical readout of a single electron spin using cavity quantum electrodynamics. The spin is trapped in a single quantum dot that is strongly coupled to a nanophotonic cavity. Selectively coupling one of the optical transitions of the quantum dot to the cavity mode results in a spin-dependent cavity reflectivity that enables projective spin measurements by monitoring the reflected intensity of an incident optical field. Using this approach, we demonstrate spin readout fidelity of 0.61 for a quantum dot that has a poor branching ratio of 0.43. Achieving this fidelity using resonance fluorescence from a bare dot would require 43 times improvement in photon collection efficiency.