The study aimed to investigate the association between food consumption with hyperglycemia among middle-aged adults in Indonesia. This cross-sectional study utilized secondary data from the 2018 Indonesia Basic Health Survey (IBHS). A total of 8,477 subjects met the inclusion criteria and included in this study. Fasting Blood Glucose (FBG) was analyzed in the laboratory using an enzymatic analysis. The fasting blood glucose was categorized as hyperglycemia (≥126 mg/dl) and normal (<126 mg/dl). A food frequency questionnaire was used to assess the food intake. Multiple logistic regression was used to analyze the association of food consumption and hyperglycemia. Our results found that the prevalence of hyperglycemia in this population was 43%. The mean FBG was 104.68±31.99 mg/dL for male and 110.75±43.92 mg/dl for female subjects. Frequent consumption of sweet desserts (OR=1.265; CI=1.132, 1.413), Sugar-Sweetened Beverages (SSB) (OR=1.433; 95% CI:1.263−1.626), salty foods (OR=1.189; 95% CI=1.079−1.311), fried foods (OR=1.172; 95% CI=1.033−1.331), and instant foods (OR=1.186; 95 % CI=1.088−1.293) were significantly associated with increased odds of hyperglycemia. There was a significant association between food consumption and hyperglycemia among middle-aged adults in Indonesia.