We aimed to compare nonalcoholic fatty liver disease (NAFLD) and metabolic dysfunction-associated steatotic liver disease (MASLD) definitions concerning diabetes prediction in a large sample of Brazilian adults. As a secondary objective, we compared associations between NAFLD/MASLD and diabetes across self-declared race/skin color groups. The Brazilian Longitudinal Study of Adult Health (ELSA-Brasil) is a prospective cohort study of Brazilian civil servants (35-74 years) enrolled from 2008 to 2010 and followed up from 2012-2014 and 2017-2019. We ascertained type 2 diabetes mellitus at baseline as well as follow-up visits based on self-reported diagnosis, medication use, and glycemic tests (fasting and 2h post-OGTT glucose and HbA1c). We excluded individuals with heavy alcohol consumption or self-reported cirrhosis/hepatitis. We analyzed 7,073 subjects. NAFLD was defined by ultrasound-based steatosis. Participants with steatosis and at least one cardiometabolic factor were considered as having MASLD. Cox proportional hazards models were performed to evaluate the association between NAFLD/MASLD and the incidence of type 2 diabetes mellitus. At baseline, 33.9% of individuals presented NAFLD and 32.5% presented MASLD. Over 9.4 years of follow-up, the relative increase in the incidence of diabetes was 78% for NAFLD (HR = 1.78; 95%CI: 1.58-2.01) and 88% for MASLD (HR = 1.88; 95%CI: 1.67-2.12). Associations did not differ significantly among race/skin color groups (p for interaction = 0.10 for MASLD and 0.08 for NAFLD). In this large cohort of middle-aged and older Brazilian adults, the relative incidence of diabetes was similar for NAFLD and MASLD definitions, with similar associations in all ethnic groups.