Objective: To study the binding target of photosensitizer and bacteria in antimicrobial photodynamic therapy with computer-simulated target prediction and molecular docking research methods and to calculate the binding energy., Methods: The protein names of Porphyromonas gingivalis ( Pg ) were obtained and summarized in Uniprot database and RCSB PDB database; the structure diagrams of methy-lene blue were screened in SciFinder database, PubChem database, ChemSpider database, and Chemical Book, and ChemBioDraw software was used to draw and confirm the three-dimensional structure for target prediction and Cytoscape software was used to build a visual network diagram; a protein interaction network was searched and built between the methylene blue target and the common target of Pg in the String database; then we selected FimA, Mfa4, RgpB, and Kgp K1 proteins, used AutoDock software to calculate the docking energy of methylene blue and the above-mentioned proteins and performed molecular docking., Results: The target prediction results showed that there were 19 common targets between the 268 potential targets of methylene blue and 1 865 Pg proteins. The 19 targets were: groS, radA, rplA, dps, fabH, pyrG, thyA, panC, RHO, frdA, ileS, bioA, def, ddl, TPR, murA, lepB, cobT, and gyrB. The results of the molecular docking showed that methylene blue could bind to 9 sites of FimA protein, with a binding energy of -6.26 kcal/mol; with 4 sites of Mfa4 protein and hydrogen bond formation site GLU47, and the binding energy of -5.91 kcal/mol, the binding energy of LYS80, the hydrogen bond forming site of RgpB protein, was -5.14 kcal/mol, and the binding energy of 6 sites of Kgp K1 protein and the hydrogen bond forming site GLY1114 of -5.07 kcal/mol., Conclusion: Computer simulation of target prediction and molecular docking technology can initially reveal the binding, degree of binding and binding sites of methylene blue and Pg proteins. This method provides a reference for future research on the screening of binding sites of photosensitizers to cells and bacteria.