We developed an optical coherence photoacoustic microscopy (OC-PAM) system, which can accomplish optical coherence tomography (OCT) and photoacoustic microscopy (PAM) simultaneously by using a single pulsed broadband light source. With a center wavelength of 800 nm and a bandwidth of 30 nm, the system is suitable for imaging the retina. Generated from the same group of photons, the OCT and PAM images are intrinsically registered in the lateral directions. To test the capabilities of the system on multimodal ophthalmic imaging, we imaged the retina of pigmented rats. The OCT images showed the retinal structures with quality similar to conventional OCT, while the PAM images revealed the distribution of absorbers in the retina. Since the absorption of hemoglobin is relatively weak at around 800 nm, the NIR PAM signals are generated mainly from melanin in the posterior segment of the eye, thus providing melanin-specific imaging of the retina.