A novel 3D hierarchical heterojunction of protonated g-C3N4/BiOBr was fabricated by a facile precipitation method with the protonation pretreatment of g-C3N4. The material was characterized by X-ray spectrometer (SEM), transmission electron microscopic (TEM), high resolution transmission electron microscopy (HRTEM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), Fourier transform infrared spectroscopy (FTIR), UV–vis reflectance spectra (UV–Vis DRS) and Brunauer-Emmett-Teller (BET). The photocatalytic activity was systematically evaluated by the degradation of carbamazepine (CBZ) under simulated solar light irradiation. The protonated g-C3N4/BiOBr with mass ratios of 5 wt% (pgB-5) achieved the optimum performance for the CBZ removal and excellent stability. The effects of some key operating parameters were further examined in detail, including photocatalyst dosage, initial solution pH, coexisting inorganic anions (HCO3−, Cl−, NO3−). The enhanced activity was ascribed to the effective charge separation occurring at the tightly contacted interface between two phases, which was revealed by electrochemical impedance spectroscopy (EIS) and photocurrent. Basing on direct evidence of the formed hydroxyl radicals (OH), superoxide radicals (O2−) and holes (h+) by electron spin resonance (ESR), the photocatalytic mechanism was proposed for the charge separation. The reaction intermediates were determined by liquid chromatography coupled with mass spectrometry (LC-MS) and a tentative degradation pathway of CBZ was proposed. This study provided a new insight for the design of novel 3D hierarchical heterojunctions and the degradation of recalcitrant organic contaminants in aquatic environment.