The relationship between the long-term joint exposure to ambient air pollution and incidence of myocardial infarction (MI) and modification by genetic susceptibility remain inconclusive. We analysed 329 189 UK Biobank participants without MI at baseline. Exposure concentrations to particulate matter (PM2.5 and PM10), nitrogen dioxide (NO2), and nitrogen oxides (NOx) were obtained. Air pollution score assessing the joint exposure was calculated, and its association with MI was evaluated via Cox model under the P value aggregation framework. Genetic susceptibility to MI was evaluated by incorporating polygenic risk score (PRS) into models. Risk prediction models were also established. During a median follow-up of 13.4 years, 9993 participants developed MI. Per interquartile range increase of PM2.5, PM10, NO2, and NOx resulted in 74% [95% confidence intervals (CIs) 69%-79%], 67% (63%-72%), 46% (42%-49%), and 38% (35%-41%) higher risk of MI. Compared with the lowest quartile (Q1) of air pollution score, the multivariable adjusted hazard ratio (HR) (95%CIs) of Q4 (the highest cumulative air pollution) was 3.50 (3.29-3.72) for MI. Participants with the highest PRS and air pollution score possessed the highest risk of incident MI (HR = 4.88, 95%CIs 4.35-5.47). Integrating PRS, air pollution exposure, and traditional factors substantially improved risk prediction of MI. Long-term joint exposure to air pollutants including PM2.5, PM10, NO2, and NOx is substantially associated with increased risk of MI. Genetic susceptibility to MI strengthens such adverse joint association. Air pollutions together with genetic and traditional factors enhance the accuracy of MI risk prediction.