Photocatalytic and photothermal disinfection is a promising strategy for addressing the challenges of environmental microbial contamination. In this work, we choose a metal–organic framework (MOF), ZIF-8, as an inexpensive and ideal model for metal ion doping, and manipulate the band structure, thermal vibration in molecules, charge distribution, and robustness of the metal–ligand coordination bond of the metal-ion-doped ZIFs for their use in photo-disinfection. The effects of their absorption edge, rate of the photo-induced temperature rise, transient photocurrent response, photo-generated reactive oxygen species (ROS) type, and crystal stability on the photo-disinfection performance are systematically studied by varying the metal ion type (Co2+, Ni2+, or Cu2+) and doping concentration (1–100%). The results show that the efficiency of light harvesting and photogenerated carrier separation is facilitated in all doped ZIFs. The photothermal conversion gradually improves with the increasing concentration of doped Co2+/Cu2+. Remarkably, the photo-generated ROS type changes from the original singlet oxygen (1O2) to multiple ROS (1O2 and •O2−) due to the introduction of Co(II) sites. Consequently, compared with pristine ZIF-8 and other doped ZIFs, Co2+-doped ZIF-8 with a 5% doping concentration shows the highest sterilization efficiency (6.6 log10 CFU mL−1) against Escherichia coli (E. coli) under simulated sunlight within one hour by virtue of the enhanced photothermal effect and the generation of multiple ROS. This work provides insights into the application of metal-ion-doped MOF photocatalysts to the disinfection of environments with pathogenic microorganisms.