Dental caries is one of the most common diseases affecting more than 2 billion people's health worldwide. In a clinical setting, it is challenging to predict and proactively guard against dental cavities prior to receiving a confirmed diagnosis. Streptococcus mutans (S. mutans) in saliva has been recognized as the main causative bacterial agent that causes dental caries. High sensitivity, good selectivity, and a wide detection range are incredibly important factors to affect S. mutans detection in practical applications. In this study, we present a portable saliva biosensor designed for the early detection of S. mutans with the potential to predict the occurrence of dental cavities. The biosensor was fabricated using a S. mutans-specific DNA aptamer and S. mutans-imprinted polymers. Methylene blue was utilized as a redox probe in the sensor to generate current signals for analysis. When S. mutans enters complementarily S. mutans cavities, it blocks electron transfer between methylene blue and the electrode, resulting in decreases in the reduction current signal. The signal variations are associated with S. mutans concentrations that are useful for quantitative analysis. The linear detection range of S. mutans is 10 2 −10 9 cfu mL −1 , which covers the critical concentration of high caries risk. The biosensor exhibited excellent selectivity toward S. mutans in the presence of other common oral bacteria. The biosensor's wide detection range, excellent selectivity, and low limit of detection (2.6 cfu mL −1 ) are attributed to the synergistic effect of aptamer and S. mutans-imprinted polymers. The sensor demonstrates the potential to prevent dental caries.