Carbon doped hexagonal boron nitride epilayers have been grown by metal organic chemical vapor deposition. Photocurrent excitation spectroscopy has been utilized to probe the energy levels associated with carbon impurities in hexagonal boron nitride (h-BN). The observed transition peaks in photocurrent excitation spectra correspond well to the energy positions of the bandgap, substitutional donors (CB, carbon impurities occupying boron sites), and substitutional acceptors (CN, carbon impurities occupying nitrogen sites). From the observed transition peak positions, the derived energy level of CB donors in h-BN is ED ∼ 0.45 eV, which agrees well with the value deduced from the temperature dependent electrical resistivity. The present study further confirms that the room temperature bandgap of h-BN is about 6.42-6.45 eV, and the CN deep acceptors have an energy level of about 2.2-2.3 eV. The results also infer that carbon doping introduces both shallow donors (CB) and deep acceptors (CN) via self-compensation, and the energy level of carbon donors appears to be too deep to enable carbon as a viable candidate as an n-type dopant in h-BN epilayers.