Interfacial photoelectrochemistry at photoanodes has been extensively researched for solar energy conversion, but its application for the production of high-value-added chemical compounds in organic chemistry still presents challenges. Herein, we report photoelectrocatalytic Cl-mediated C(sp3)–H aminomethylation of alkanes with self-developed and reusable BiVO4 photoanodes. The swift condensation of aniline with aldehydes, along with the decrease of the electricity input of aniline by photogenerated holes in the BiVO4 photoanodes, work together to prevent excessive oxidation of aniline, leading to high yields of the desired product. Mechanistic experiments demonstrate that Cl- ions, as the key mediators, could be attracted to holes in the photoanodes and oxidized to form the Cl2. This is followed by light-promoted homolytic cleavage of Cl2, generating Cl radicals that efficiently abstract hydrogen atoms from hydrocarbons. This work opens an avenue for interfacial photoelectrochemical organic synthesis and demonstrates a potential method for optimizing solar energy conversion into fuels. A stable and recyclable BiVO4 photoelectrode material was developed for the efficient Cl-mediated C(sp3)–H aminomethylation of hydrocarbons in a photoelectrochemical cell, which provides a promising method for efficient solar fuel conversion.