Lincomycin (Lin) exhibits diverse toxic effects on both public health and environmental quality. A self-powered photoelectrochemical (PEC) Lin aptasensor has been constructed based on Mn valence-engineered MnO2/BiOCl heterojunction (MnV-MnO2/BiOCl). MnV-MnO2/BiOCl can achieve effective utilization of light and rapid separation and transfer of photogenerated carriers. The formation of MnV-MnO2/BiOCl was accompanied by the introduction of unsaturated Mn3+. Unsaturated Mn3+ not only can form a redox pair with Mn4+, acting as an electron/hole trap center, but also endows MnV-MnO2 with half-metallic character, thus improving the electronic property and conductivity of MnV-MnO2 in MnV-MnO2/BiOCl. The synergy in these aspects contributed to dramatic improvement of photoelectric conversion efficiency about MnV-MnO2/BiOCl. The separated holes in MnV-MnO2/BiOCl can oxidize Lin trapped by aptamer, which hinders electrons-hole recombination and leads to enhancement of photocurrent. This PEC Lin aptasensor based on MnV-MnO2/BiOCl/ITO exhibited a linear scope in 1.0 × 10−3–1.0 × 103 nM with detection limit of 3.33 × 10−4 nM. Besides, the aptasensor presented admiring selectivity, stability and reproducibility. This work verified that the simultaneous utilization of an electron/hole trap center and heterojunction construction can cooperatively enhance PEC performance and broaden the application of BiOCl in PEC field.