Direct oxidation of benzyl alcohol (BzOH) to benzaldehyde (BzH) using O2 as the oxidant has crucial significance under mild conditions in industrial manufacturing. Herein, an efficient and ecofriendly Pd/O-g-C3N4 heterojunction catalyst using oxygen-doped g-C3N4 (O-g-C3N4) with a porous surface as the support is developed for visible light-driven thermocatalytic oxidation of BzOH to BzH by using O2 as the sole oxidant. The obtained Pd/O-g-C3N4 exhibits visible light-enhanced catalytic performance under visible light irradiation with BzOH conversion and BzH yield of 89.4 and 76.6%, respectively, which are 1.96 and 1.83 times higher than those for the catalyst in the dark. Oxygen doping, as well as Pd deposition, can significantly narrow the band gap of g-C3N4, thereby enhancing its visible light harvesting ability. The resulting heterojunction interface between Pd nanoparticles and O-g-C3N4 might promote separation of the photogenerated e--h+ pairs. In addition to achieving considerable BzOH conversion and BzH yield, Pd/O-g-C3N4 also exhibits impressive stability. The current study provides potential applications for the green and efficient catalytic oxidation of other alcohols to corresponding aldehydes using O2 as the oxidant.