Research has identified fetal risk factors for adult diseases, forming the basis for the Developmental Origins of Health and Disease (DOHaD) hypothesis. DOHaD suggests that maternal insults during pregnancy cause structural and functional changes in fetal organs, increasing the risk of chronic diseases like type 2 diabetes mellitus (T2DM) in adulthood. It is proposed that altered maternal physiology, such as increased glucocorticoid (GC) levels associated with a dysregulated hypothalamic-pituitary-adrenal (HPA) axis in maternal stress and T2DM during pregnancy, exposes the fetus to excess GC. Prenatal glucocorticoid exposure reduces fetal growth and programs the fetal HPA axis, permanently altering its activity into adulthood. This programmed HPA axis is linked to increased risks of hypertension, cardiovascular diseases, and mental disorders in adulthood. With the global rise in T2DM, particularly among young adults of reproductive age, it is crucial to prevent its onset. T2DM is often preceded by a prediabetic state, a condition that does not show any symptoms, causing many to unknowingly progress to T2DM. Studying prediabetes is essential, as it is a reversible stage that may help prevent T2DM-related pregnancy complications. The existing literature focuses on HPA axis dysregulation in T2DM pregnancies and its link to fetal programming. However, the effects of prediabetes on HPA axis function, specifically glucocorticoid in pregnancy and fetal outcomes, are not well understood. This review consolidates research on T2DM during pregnancy, its impact on fetal programming via the HPA axis, and possible links with pregestational prediabetes.