Novel control strategies for membrane biofouling with eco-friendly photocatalytic technology are critically needed in practical operation of membrane bioreactors (MBRs). In this study, a metal-organic frameworks (MOF) based photocatalytic membrane was firstly applied in an anammox MBR for a long-term biofouling control, where bacteria were inactivated and foulants were degraded simultaneously, with environmentally friendly and renewable visible light energy. By physicochemical characterization, the synthesized photocatalyst of CdS/MIL-101 showed superior visible-light photocatalytic ability, and the 1 wt% CdS/MIL-101 modified membrane C2 showed enhanced hydrophilicity and water permeability compared with the pristine membrane C0. In the long-term operation of anammox MBRs under waterproof lights irradiation, the filtration cycles of C2 (25–26 d) were obviously extended compared with C0 (10–14 d), while their average total nitrogen removal efficiencies were comparable up to 84%, indicating an excellent biofouling alleviation effect by using C2 with a satisfactory nitrogen removal performance maintained. By analysis of the biofilm on the fouled membranes, the organic foulants (especially extracellular polymeric substances) were degraded, and the live bacteria were inactivated effectively by the photocatalytic reactions of CdS/MIL-101 on C2. In the antimicrobial tests against model bacteria, C2 exhibited remarkable antimicrobial effect against both Gram-negative and Gram-positive bacteria with visible light irradiation by destruction of cell integrity with the inhibition rate of 92% for Escherichia coli and 95% for Staphylococcus aureus, respectively. In the model foulants (bovine serum albumin, sodium alginate, and humic acid) filtration tests, C2 showed higher antifouling capabilities, lower flux declining rates, and higher foulants rejection rates under visible light irradiation compared with C0. The reactive species of ·OH, e– and h+ generated on C2 were verified to play the predominant role in the anti-biofouling processes by simultaneous bacteria inactivation and foulants degradation. The findings offer a novel insight into the biofouling controlling in MBRs by simultaneous bacteria inactivation and foulants degradation with an eco-friendly method.