After adjusting for potential confounding factors, we observed a J-shaped association between serum PRL and the risk of MAFLD among females but not males, suggesting that high-normal serum PRL may protect against MAFLD while hyperprolactinemia may be a risk factor for MAFLD in females with T2DM but not in males. This evidence concerns the gene PRL and hyperprolactinemia.