This study aimed to evaluate the antibacterial efficacy of erythrosine-mediated photodynamic therapy (PDT) against <i>Streptococcus mutans</i> (<i>S. mutans</i>) in dentin and its effect on the shear bond strength (SBS) of composite resin to dentin. Eighty extracted human noncarious premolars were used in this study. Forty teeth were used for the antibacterial activity test, while the remaining 40 were used for the SBS test. Both experiments were conducted with 4 experimental groups (n = 10): control (distilled water), sodium hypochlorite (NaOCl, 6%), chlorhexidine (CHX, 0.12%), and erythrosine-mediated PDT. Antibacterial effects were evaluated by counting <i>S. mutans</i> colony-forming units (CFUs). The SBS of composite resins to dentin was measured using a universal testing machine. All treatments (NaOCl, CHX, and PDT) demonstrated statistically significant differences in antibacterial activity compared with the control group (<i>p</i> < 0.05). The antibacterial effects were ranked from strongest to weakest as follows: NaOCl, PDT, and CHX. In the SBS test, the NaOCl group exhibited a statistically significant difference compared with the CHX, PDT, and control groups (<i>p</i> < 0.05), with the lowest bond strength. No statistically significant differences were found among the CHX, PDT, and control groups (<i>p</i> > 0.05). Erythrosine-mediated PDT exhibited significant antibacterial effects against <i>S. mutans</i>, with higher antibacterial activity than CHX but lower than NaOCl. Only NaOCl negatively affected the bond strength of composite resin to dentin. In conclusion, erythrosine-mediated PDT shows potential as a cavity disinfectant due to its significant antibacterial effects against <i>S. mutans</i> and lack of adverse effects on bond strength.