In this work, the prepared cobalt oxide decorated boron-doped g-C 3 N 4 (CoOx/g-C 3 N 4 ) heterojunction exhibits remarkable activity in CO 2 reduction (CO 2 RR), resulting in high yields of CH 3 COOH (∼383 μmol•g catalyst −1) and CH 3 OH (∼371 μmol• g catalyst −1) with 58% selectivity to C 2+ under visible light. However, the same system leads to high H 2 evolution (HER) by increasing the cobalt oxide content, suggesting that the selectivity and preference for the CO 2 RR or HER depend on oxide decoration. By comparing HER and CO 2 RR evolution in the same system, this work provides critical insights into the catalytic mechanism, indicating that the CoOx/g-C 3 N 4 heterojunction formation is necessary to foster high visible light photoactivity.