Cavities, commonly caused by bacteria metabolic acid in dental plaque, pose a prevalent dental problem. This study investigates the use of biocompatible zeolitic imidazolate framework 67 (ZIF-67) for cavities. ZIF-67 exhibits strong metal-binding properties and a large surface area. Streptococcus mutans (S. mutans) are responsible for dental plaque and cavities. In vitro studies have demonstrated that ZIF-67 could effectively inhibit S. mutans. Experimental evidence reveals that ZIF-67 can disrupt pathogen cell walls, resulting in leakage of DNA and RNA. Additionally, ZIF-67 inhibits biofilm formation on tooth surfaces without cytotoxicity on mammalian gingival fibroblast cells. These findings demonstrate the promising potential of ZIF-67 in preventing cavities and their biomedical applications.