Nonalcoholic fatty liver disease (NAFLD) is a common chronic liver disorder closely linked to circadian rhythm disruption (CRD) and endoplasmic reticulum stress (ERS). We aimed to identify CRD- and ERS-associated biomarkers in NAFLD samples and elucidate their roles in shaping disease pathogenesis. We first performed Mendelian randomization (MR) to identify circadian rhythm-related genes (CRRGs) with putative causal effects on NAFLD. Differential expression analysis was conducted via GSE126848 (discovery dataset) to identify differentially expressed genes (DEGs) between NAFLD and controls. Weighted gene coexpression network analysis (WGCNA) revealed the key NAFLD-associated module and its member genes. Candidate genes were defined as the union of DEGs and genes from the WGCNA NAFLD-associated module that overlapped with either causal CRRGs or endoplasmic reticulum stress-related genes (ERSRGs). Machine learning, expression validation, and receiver operating characteristic (ROC) analysis were applied to identify key biomarkers, which were integrated to establish a diagnostic signature and a nomogram for NAFLD risk prediction. Immune cell infiltration, functional enrichment, drug repositioning, and molecular docking were analyzed. Finally, a high-fat, high-cholesterol, and high-fructose diet (HFCFD)-induced NAFLD mouse model was established to validate the expression levels of the biomarkers in vivo. By intersecting DEGs and genes from the WGCNA NAFLD-associated module with 168 causal CRRGs and 267 ERSRGs and then combining the resulting sets, we obtained 33 candidate genes after coexpression filtering. Machine learning, expression validation, and ROC analysis revealed four biomarkers, that is, CREB3, DERL2, LYPLAL1, and ERN1. The RT-qPCR results confirmed that, compared with those in the normal group, the expression of CREB3, DERL2, and LYPLAL1 was significantly upregulated, whereas the expression of ERN1 was significantly downregulated in the liver tissues of NAFLD mice, which was highly consistent with the results of the bioinformatics predictions. A machine learning-based diagnostic model built on these biomarkers achieved a mean area under the curve (AUC) of 0.908. The accompanying nomogram exhibited high predictive performance for NAFLD. The proportions of naive B cells, resting dendritic cells, macrophages M1, plasma cells, and gamma delta T cells were elevated in NAFLD samples. GSEA indicated that these biomarkers were associated primarily with endoplasmic reticulum protein processing, the unfolded protein response (UPR), and branched-chain amino acid degradation and implicated retinol and thiamine metabolism. CREB3, DERL2, LYPLAL1, and ERN1 emerged as key NAFLD biomarkers linked to CRD and ERS, providing insights into disease pathogenesis.