Abstract We aimed to investigate the association between air pollution and advanced fibrosis among patients with metabolic associated fatty liver disease (MAFLD) and chronic hepatitis B virus (HBV) and hepatitis C virus (HCV) infections. A total of 1376 participants who were seropositive for HBV surface antigen (HBsAg) or antibodies to HCV (anti‐HCV) or had abnormal liver function in a community screening program from 2019 to 2021 were enrolled for the assessment of liver fibrosis using transient elastography. Daily estimates of air pollutants (particulate matter ≤2.5 μm in diameter [PM2.5], nitrogen dioxide [NO2], ozone [O3] and benzene) were aggregated into mean estimates for the previous year based on the date of enrolment. Of the 1376 participants, 767 (52.8%) and 187 (13.6) had MAFLD and advanced fibrosis, respectively. A logistic regression analysis revealed that the factors associated with advanced liver fibrosis were HCV viremia (odds ratio [OR], 3.13; 95% confidence interval [CI], 2.05–4.77; p