Metabolic associated fatty liver disease (MAFLD) is a new concept proposed in 2020. This study aimed to explore the relationship between serum 25-hydroxy vitamin D (25(OH)D) level and MAFLD based on a population survey dataset (the third National Health and Nutrition Examination Surveys of the United States). Multivariate logistic regression was used to estimate the odds ratio (OR) of serum 25(OH)D level for MAFLD. A total of 12,878 participants were included in this analysis. Among them, 4,027 (31.27%) cases were diagnosed with MAFLD and 8,851 (66.40%) were without MAFLD (non-MAFLD). Patients with vitamin D sufficiency and insufficiency totaled 6,983 (54.22%) and 5,895 (45.78%), respectively. The incidence of MAFLD and the grade of hepatic steatosis were both significantly higher in vitamin D insufficiency group. Multivariate analysis showed that vitamin D insufficiency was an independent risk factor for MAFLD after adjusted for other confounders (OR: 1.130, 95%CI: 1.035 to 1.234). In MAFLD population, the average serum 25(OH)D level decreased with the numbers of metabolic risks in MAFLD cases. Serum 25(OH)D level was not associated with the severity of fibrosis or steatosis in MAFLD group. In Conclusion, lower serum 25(OH)D level is associated with higher prevalence of MAFLD in general population. No relationship was found between serum 25(OH)D level and the severity of hepatic steatosis or fibrosis in MAFLD.