Background: There is evidence that vitamin B12 and associated metabolite levels are changed in non-alcoholic fatty liver disease (NAFLD) and non-alcoholic steatohepatitis (NASH); however, their association has been in dispute. Methods: We included 8397 individuals without previous liver condition or excess alcohol intake from the National Health and Nutrition Examination Survey (NHANES) 1999–2004. NAFLD was diagnosed with Fatty Liver Index (FLI) ≥ 60 or USFLI ≥ 30, and participants with advanced fibrosis risks were identified with elevated non-alcoholic fatty liver disease fibrosis score (NFS), fibrosis 4 index (FIB-4), or aspartate aminotransferase (AST)/platelet ratio index (APRI). Step-wide logistic regression adjusting for confounders was used to detect the association between NAFLD or advanced fibrosis with serum vitamin B12, folate, red blood cell folate (RBC folate), homocysteine (HCY), and methylmalonic acid (MMA). Results: The weighted prevalence of NAFLD was 44.2%. Compared with non-NAFLD participants, patients with NAFLD showed significantly increased RBC folate level and RBC counts, decreased serum vitamin B12 and folate, and similar HCY and MMA levels. NAFLD with advanced fibrosis risk had higher MMA and HCY, reduced serum vitamin B12, and similar serum folate and RBC folate levels than NAFLD with low fibrosis risk. Only RBC folate was independently associated with an increased risk of NAFLD (OR (95% CI): 2.24 (1.58, 3.18)). In all participants, MMA (OR: 1.41 (1.10, 1.80)) and HCY (OR: 2.76 (1.49, 5.11)) were independently associated with increased risk for advanced fibrosis. In participants with NAFLD, this independent association still existed (OR: 1.39 (1.04, 1.85) for MMA and 1.95 (1.09, 3.46) for HCY). In all patients, the area under the receiver operating characteristic curve (ROC AUC) on fibrosis was 0.6829 (0.6828, 0.6831) for MMA and 0.7319 (0.7318, 0.7320) for HCY; in participants with NAFLD, the corresponding ROC AUC was 0.6819 (0.6817, 0.6821) for MMA and 0.6926 (0.6925, 0.6928) for HCY. Conclusion: Among vitamin B12-associated biomarkers, RBC folate was independently associated with elevated NAFLD risk, whereas MMA and HCY were associated with increased risk for advanced fibrosis in the total population and NAFLD participants. Our study highlighted the clinical diagnostic value of vitamin B12 metabolites and the possibility that vitamin B12 metabolism could be a therapeutic target for NASH. Further studies using recent perspective data with biopsy proven NASH could be conducted to validate our results.