Evidence for long-term mortality risks of PM2.5 comes mostly from large administrative studies with incomplete individual information and limited exposure definitions. Here we assess PM2.5-mortality associations in the UK Biobank cohort using detailed information on confounders and exposure. We reconstructed detailed exposure histories for 498,090 subjects by linking residential data with high-resolution PM2.5 concentrations from spatio-temporal machine learning models. We split the time-to-event data and assigned yearly exposures over a lag window of 8 years. We fitted Cox proportional hazard models with time-varying exposure controlling for contextual and individual-level factors, as well as trends. In secondary analyses, we inspected the lag structure using distributed lag models and compared results with alternative exposure sources and definitions. In fully adjusted models, an increase of 10 μg/m³ in PM2.5 was associated with hazard ratios (HRs) of 1.27 (95%CI: 1.06-1.53) for all-cause, 1.24 (1.03-1.50) for non-accidental, 2.07 (1.04-4.10) for respiratory, and 1.66 (0.86-3.19) for lung cancer mortality. We found no evidence of association with cardiovascular deaths (HR=0.88, 95%CI: 0.59-1.31). We identified strong confounding by both contextual- and individual-level lifestyle factors. The distributed lag analysis suggested differences in relevant exposure windows across mortality causes. Using more informative exposure summaries and sources resulted in higher risk estimates. We found associations of long-term PM2.5 exposure with all-cause, non-accidental, respiratory, and lung cancer mortality, but not with cardiovascular mortality. This study benefits from finely reconstructed time-varying exposures and extensive control for confounding, further supporting a plausible causal link between long-term PM2.5 and mortality.