The safety of groundwater and drinking water is directly related to the well-being of human beings and ecosystems. On-site monitoring and timely response to heavy metals in these water sources are crucial for water supply security. Fluorescent probes combined with machine learning technology have been applied to on-site detection of heavy metals. However, they were primarily focused on industrial-level detection and lacked the sensitivity required for detecting Cr(VI) in groundwater and drinking water. In this study, we developed an machine learning-integrated approach using high-quantum-yield (QY) N-doped blue-light carbon dots (N-BCDs) for instant detection of Cr(VI) in groundwater and drinking water. N-BCDs were synthesized within 3 min using a household microwave oven with citric acid and 1,2-diaminobenzene, resulting in a QY of approximately 90 %. The fluorescence of N-BCDs was quenched via the internal filter effect (IFE), enabling the detection of Cr(VI) within 1 min, with a detection limit of 0.1574 μg L−1 for Cr(VI) concentrations ranging from 0 to 60 μg L−1. We employed machine learning methods to determine Cr(VI) concentrations from simple shots, based on the red-green-blue (RGB) feature and Kmeans feature extraction. These features were input into four models (Ridge, XGB, SVR, and Linear), achieving a fitness of 95.2 %. Furthermore, the accuracies for Cr(VI) concentration identification in actual groundwater and drinking water were as high as 95.71 % and 96.81 %, respectively. Our work successfully extended the detection range of Cr(VI) to the μg level, significantly improving the practical applicability of the method and providing a new approach for on-site detection of Cr(VI) in groundwater and drinking water.