IntroductionPrevious observational studies have demonstrated the relationship between leisure sedentary behavior, physical activity, and nonalcoholic liver disease (NAFLD). However, whether these associations are causal or confounding factors remains unclear.MethodsPooled genetic data from the UK Biobank and other large genome-wide association studies (GWAS) were used to extract instrumental variables representing sedentary television watching, computer use, driving, vigorous physical activity (VPA), and moderate-to-vigorous physical activity (MVPA). The two-sample Mendelian randomization (MR) method was used to explain the causal relationship between them and NAFLD. The inverse variance of the weighted method was used as the main analysis method, and MR-Egger, weighted median, MR-PRESSO, and other supplementary methods were also used. A sensitivity analysis was also performed. Simultaneously, the common risk factors for NAFLD were further analyzed for potential mediating associations.ResultsWe observed that sedentary television viewing (odds ratio (OR): 1.84; 95% confidence interval (CI): 1.09–3.10;p= 0.021) and genetically predicted VPA duration (OR: 0.0033; 95% CI: 0.000015–0.70;p= 0.036) were suggestively associated with the risk of NAFLD. Using a computer (OR: 1.51; 95% CI: 0.47–4.81;p= 0.484), driving (OR: 0.78; 95% CI: 0.05–11.94;p= 0.858), and MVPA time (OR: 0.168; 95% CI: 0.01–2.81;p= 0.214) were not significantly associated with NAFLD. The role of heterogeneity versus pleiotropy was limited in all the analyses.DiscussionThis study supports the association between sedentary television watching and an increased risk of NAFLD, along with vigorous physical activity as a possible protective factor for NAFLD.