Recently, the widespread use of antibiotics is becoming a serious worldwide public health challenge, which causes antimicrobial resistance and the occurrence of superbugs. In this context, MnO2 has been proposed as an alternative approach to achieve target antibacterial properties on Streptococcus mutans (S. mutans). This requires a further understanding on how to control and optimize antibacterial properties in these systems. We address this challenge by synthesizing δ-MnO2 nanoflowers doped by magnesium (Mg), sodium (Na), and potassium (K) ions, thus displaying different bandgaps, to evaluate the effect of doping on the bacterial viability of S. mutans. All these samples demonstrated antibacterial activity from the spontaneous generation of reactive oxygen species (ROS) without external illumination, where doped MnO2 can provide free electrons to induce the production of ROS, resulting in the antibacterial activity. Furthermore, it was observed that δ-MnO2 with narrower bandgap displayed a superior ability to inhibit bacteria. The enhancement is mainly attributed to the higher doping levels, which provided more free electrons to generate ROS for antibacterial effects. Moreover, we found that δ-MnO2 was attractive for in vivo applications, because it could nearly be degraded into Mn ions completely following the gradual addition of vitamin C. We believe that our results may provide meaningful insights for the design of inorganic antibacterial nanomaterials.