Objectives: Racial disparities in preexisting diabetes mellitus (PDM) and gestational diabetes mellitus (GDM) remain largely unexplored. We examined national PDM and GDM prevalence trends by race/ ethnicity and the association between these conditions and fetal death.Methods: This was a retrospective cross-sectional analysis of 69,539,875 pregnancy-related hospitalizations from 2002 to 2017 including 674,040 women with PDM (1.0%) and 2,960,797 (4.3%) with GDM from the US Nationwide Inpatient Sample Survey. Joinpoint regression was used to evaluate trends in prevalence. Survey logistic regression was used to evaluate the association between exposures (PDM and GDM) and outcome.Results: Overall, the average annual increase in prevalence was 5.2% (95% confidence interval [CI] 4.2-6.2) for GDM and 1.0% (95% CI −0.1 to 2.0) for PDM, during the study period. Hispanic (average annual percentage change 5.3, 95% CI 3.6 − 7.1) and non-Hispanic Black (average annual percentage change 0.9, 95% CI 0.1 − 1.7) women had the highest average annual percentage increase in the prevalence of GDM and PDM, respectively. After adjustment, the odds of stillbirth were highest for Hispanic women with PDM (odds ratio 2.41, 95% CI 2.23-2.60) and decreased for women with GDM (odds ratio 0.51, 95% CI 0.50-0.53), irrespective of race/ethnicity.Conclusions: PDM and GDM prevalence is increasing in the United States, with the highest average annual percentage changes seen among minority women. Furthermore, the reasons for the variation in the occurrence of stillbirths among mothers with PDM and GDM by race/ethnicity are not clear and warrant additional research.