Background: The main objective of this study is to identify the risk factors of metabolic dysfunction-associated fatty liver disease (MAFLD) in coronary artery disease (CAD) patients. Methods: The present retrospective cohort study is part of the Pars Cohort Study (PCS). The participants were categorized as having MAFLD or not. The pattern of independent variables in patients was compared with those who did not have MAFLD. All variables were retained in the multivariable logistic regression model. Results: Totally, 1862 participants with CAD were enrolled in this study. MAFLD was diagnosed in 647 (40.1%) participants. Gender, diabetes, hypertension, tobacco, opium, alcohol, age, weight, waist circumference, cholesterol, HDL, triglyceride, aspartate aminotransferase (AST), and alanine aminotransferase (ALT) were significantly different in MAFLD and non-MAFLD patients. Also, the results of multivariable logistic regression show male gender (OR=0.651, 95% CI: 0.470‒0.902, P value=0.01) and opium consumption (OR=0.563, 95% CI: 0.328‒0.968, P value<0.001) to be negative risk factors of MAFLD occurrence in CAD patients. Having diabetes (OR=2.414, 95% CI: 1.740-3.349, P value<0.001), high waist circumference (OR=1.078, 95% CI: 1.055‒1.102, P value<0.01), high triglyceride (OR=1.005, 95% CI: 1.001‒1.008, P value=0.006), and high ALT (OR=1.039, 95% CI: 1.026‒1.051, P value<0.01) were positive risk factors of MAFLD in CAD patients. Conclusion: Our study found that consuming opium decreases the likelihood of MAFLD in CAD patients, since these patients have decreased appetite and lower body mass index (BMI). On the other hand, female gender, having diabetes, high waist circumference, high triglyceride levels, and high ALT levels increase the probability of MAFLD in CAD patients.