To investigate the relationship of hemoglobin (HGB), dyslipidemia, and prepregnancy body mass index with gestational diabetes mellitus (GDM). This study included 1046 pregnant women who underwent antenatal examinations at our hospital between July 30th, 2018, and July 30th, 2019. Participants were divided into 2 groups: those with GDM and those without GDM. Logistic regression analysis was used to explore associations, and receiver operating characteristic curve analysis was performed to evaluate the predictive ability of hematological parameters for GDM. Subgroup analyses were performed to examine the association between HGB levels and GDM risk in different biochemical parameter subgroups. After adjusting for potential confounding factors, higher hemoglobin level in the first trimesters (HGB1) and hemoglobin levels in the second trimesters (HGB2) were associated with GDM risk. Women with low-density lipoprotein (LDL) level exceeding 2.2 mmol/L who had higher HGB1, HGB2 and hemoglobin levels in the third trimesters (HGB3) showed a significantly higher risk of GDM. Higher HGB1, HGB2, and hemoglobin levels in the third trimester were risk factors for GDM, and this association was significant among women with LDL ≥ 2.2 mmol/L. Our findings highlight HGB level as a potential novel marker for screening GDM risk in the first trimester, particularly among women with dyslipidemia.