Identifying atomic configurations of impurities in semiconductors is of fundamental interest and practical importance in designing electronic and optoelectronic devices. C impurity acting as one of the most common impurities in GaN, it is believed for a long time that it substitutes at Ga site forming CGa with +1 charge-state in p-type GaN, while it substitutes at N site forming CN with -1 charge-state in n-type GaN. However, by combining x-ray absorption spectroscopy and first-principles simulations, we observed that C is mainly occupying the N site rather than the Ga one in p-GaN. We further reveal that this is due to an H-induced EF-tuning effect. During growth, the existing H can passivate Mg dopants and upshifts the EF to the upper region of bandgap, leading to the CN formation. After the p-type activation by annealing out H, although the EF is pushed back close to the valence band maximum, whereas the extremely large kinetic barrier can prevent the migration of C from the metastable CN site to ground-state CGa site, hence stabilizing the CN configuration. Additionally, the CN with neutral charge-state ([Formula: see text]) in the p-GaN is further observed. Therefore, the real C-related hole-killer in p-type GaN could be CN rather than the commonly expected CGa. Our work not only offers the unambiguous evidence for the C defect formation in p-GaN but also contributes significantly to an in-depth understanding of the C-related hole-killers and their critical role on electrical and optoelectrical properties of p-GaN and even p-AlGaN.