Intracranial atherosclerotic stenosis (ICAS) is the most common cause of stroke, but the relationship of ICAS with fasting blood glucose (FBG) and glycated hemoglobin A1c (HbA1c) is unclear. This study aimed to investigate the effects of increased FBG and HbA1c concentration on ICAS. A total of 4,012 patients aged over 40 years who underwent cerebral magnetic resonance angiography (MRA) were enrolled in this study, including 1,434 non-stroke controls and 2,578 patients with ischemic stroke. Participants were classified into four groups according to stroke and ICAS status. ICAS was defined as the presence of ≥50% stenosis in any intracranial artery. Multivariate regression analysis was used to evaluate the associations of FBG and HbA1c with ICAS. Levels of fasting glucose and HbA1c in patients with ICAS were significantly higher than those in patients without ICAS among both stroke and non-stroke groups. Multivariate regression analysis showed that elevated levels of fasting glucose (OR 1.14, 95% CI, 1.11-1.18, P<0.001) and HbA1c (OR 1.22, 95% CI, 1.16-1.28, P<0.001) were independent risk factors for ICAS. In addition, patients with the DM (FBG ≥7.0 mmol/L) were at the high risk of ICAS in both non-stroke (OR 2.90, 95% CI, 2.11-3.99, P<0.001) and stroke (OR 1.99, 95% CI, 1.67-2.39, P<0.001) groups. Besides, subjects with the high risk of ICAS were found in the fourth HbA1c quartile in both non-stroke (OR 3.50, 95% CI, 2.23-5.61, P<0.001) and stroke (OR 1.98, 95% CI, 1.50-2.63, P<0.001) groups. The results suggest that elevated fasting glucose and HbA1c levels are associated with high risk for ICAS.