Background: Pilgrims with diabetes are at increased risk of acute metabolic complications such as diabetic ketoacidosis (DKA), hyperosmolar hyperglycemic state (HHS), and severe hypo- or hyperglycemia during Hajj, due to extreme heat, prolonged physical exertion, crowding, dehydration, and disruption of daily routines. Recent advances in continuous glucose monitoring (CGM) and artificial intelligence (AI) offer a unique opportunity to predict high-risk glycemic events before clinical deterioration.Objective: To develop and internally validate a machine learning-based predictive model using CGM, physiological, clinical, and environmental data to anticipate acute glycemic crises in pilgrims with diabetes during Hajj, and to evaluate the feasibility and preliminary effectiveness of an AI-assisted alert system in a pilot interventional study.Methods: This two-phase prospective study will be conducted among adult pilgrims with type 1 or type 2 diabetes. In Phase 1 (prospective cohort), approximately 800–1000 pilgrims will be equipped with CGM and wearable devices for continuous monitoring of glucose, heart rate, activity, and other vital signs. Environmental variables and contextual data will be collected. Supervised machine learning models will be trained to predict severe hypoglycemia, severe hyperglycemia, DKA, and HHS over short-term windows (30–60 minutes) and internally validated. In Phase 2 (pilot interventional study), approximately 300–400 pilgrims will be allocated to AI-assisted care with real-time alerts versus standard care. Incidence of acute glycemic events and healthcare utilization will be compared between groups.Expected Results: The AI model is hypothesized to achieve: (1) AUC-ROC ≥0.80 [95% CI] for discrimination, (2) sensitivity ≥80% at the 30–60 minute prediction horizon for severe hypo-/hyperglycemia, (3) calibration slope 0.9–1.1 with intercept near zero, and (4) AI-assisted care will reduce severe hypo-/hyperglycemia incidence by ≥30% compared with standard care.Conclusions: This study aims to provide a practical, scalable framework for AI-enabled risk prediction in high-risk pilgrims with diabetes during Hajj, with potential application to other mass gatherings and hot climates.