Introduction: Cities often experience high air pollution and noise levels and lack of natural outdoor environments, which may be detrimental to health. The aim of this study was to evaluate the effects of air pollution, noise, and blue and green space on premature all-cause mortality in Barcelona using a mega cohort approach. Methods: Both men and women of 18 years and above registered on 1 January 2010 by the Sistema d'Informació pel Desenvolupament de la Investigació en Atenció Primària (SIDIAP) and living in the city of Barcelona were included in the cohort and followed up until 31 December 2014 or until death (n = 2,939,067 person years). The exposure assessment was conducted at the census tract level (n = 1061). We assigned exposure to long term ambient levels of nitrogen dioxides (NO₂), nitrogen oxides (NOx), particulate matter with aerodynamic diameter less than 2.5 µm (PM2.5), between 2.5 µm and 10 µm (PM2.5⁻10, i.e., coarse particulate matter), less than 10 µm (PM10) and PM2.5 light absorption (hereafter referred to as PM2.5 absorbance) based on land use regressions models. Normalized Difference Vegetation Index (NDVI) was assigned based on remote sensing data, percentage green space and blue space were calculated based on land use maps and modelled road traffic noise was available through the strategic noise map for Barcelona. Results: In this large prospective study (n = 792,649) in an urban area, we found a decreased risk of all-cause mortality with an increase in green space measured as NDVI (hazard ratio (HR) = 0.92, 95% CI 0.89⁻0.97 per 0.1) and increased risks of mortality with an increase in exposure to blue space (HR = 1.04, 95% CI 1.01⁻1.06 per 1%), NO₂ (HR = 1.01, 95% CI 1.00⁻1.02 per 5 ug/m³) but no risk with noise (HR = 1.00, 95% CI 0.98⁻1.02 per 5 dB(A)). The increased risks appeared to be more pronounced in the more deprived areas. Results for NDVI, and to a lesser extent NO₂, remained most consistent after mutual adjustment for other exposures. The NDVI estimate was a little attenuated when NO₂ was included in the model. The study had some limitations including e.g., the assessment of air pollution, noise, green space and socioeconomic status (SES) on census tract level rather than individual level and residual confounding. Conclusion: This large study provides new insights on the relationship between green and blue space, noise and air pollution and premature all-cause mortality.