This study examined the photoluminescence (PL) of samples of GaN and found that the intensity of the peak of luminescence related to carbon impurities in p-GaN changed with the doping concentration of Mg. However, the results of a secondary ion mass spectrometry test showed that the concentration of carbon impurities did not change correspondingly. Moreover, we observed changes in the relative strength of the peak related to carbon impurities in the PL spectra of a series of samples of n-type conductive GaN. This suggests a connection between the behavior of carbon-related defects and the conductivity of GaN. The results show that the variation in carbon-related defects was monotonic. As the Fermi level approached the conductive band, carbon-related defects that generated higher-energy photonics became more dominant in the PL spectra in the series from p-type to n-type GaN.