The escalating global prevalence of diabetes highlights an urgent need for advancements in continuous glucose monitoring (CGM) technologies that are non-invasive, accurate, and user-friendly. Here, we introduce a groundbreaking portable wearable functional near-infrared spectroscopy (fNIRS) system designed to monitor glucose levels by assessing prefrontal cortex (PFC) activity. Our study delineates the development and application of this novel fNIRS system, emphasizing its potential to revolutionize diabetes management by providing a non-invasive, real-time monitoring solution. Fifteen healthy university students participated in a controlled study, where we monitored their PFC activity and blood glucose levels under fasting and glucose-loaded conditions. Our findings reveal a significant correlation between PFC activity, as measured by our fNIRS system, and blood glucose levels, suggesting the feasibility of fNIRS technology for CGM. The portable nature of our system overcomes the mobility limitations of traditional setups, enabling continuous, real-time monitoring in everyday settings. We identified 10 critical features related to blood glucose levels from extensive fNIRS data and successfully correlated PFC function with blood glucose levels by constructing predictive models. Results show a positive association between fNIRS data and blood glucose levels, with the PFC exhibiting a clear response to blood glucose. Furthermore, the improved regressive rule principal component analysis (PCA) method outperforms traditional PCA in model prediction. We propose a model validation approach based on leave-one-out cross-validation, demonstrating the unique advantages of K-nearest neighbor (KNN) models. Comparative analysis with existing CGM methods reveals that our paper’s KNN model exhibits lower RMSE and MARD at 0.11 and 8.96%, respectively, and the fNIRS data were highly significant positive correlation with actual blood glucose levels (r = 0.995, p < 0.000). This study provides valuable insights into the relationship between metabolic states and brain activity, laying the foundation for innovative CGM solutions. Our portable wearable fNIRS system represents a significant advancement in effective diabetes management, offering a promising alternative to current technologies and paving the way for future advancements in health monitoring and personalized medicine.