The Canadian research reveals the closer someone lives to a major road - and the longer they live there - the higher their risk of developing dementia.
Dr Hong Chen, who led the University of Toronto study, said: 'With our widespread exposure to traffic and the greater tendency for people to live in cities these days, this has serious health implications.'
The team plotted the addresses of 6.6million adults aged between 20 and 85 living in the province of Ontario, and then tracked them for 11 years between 2001 and 2012. Those living within 50 metres of a major route - a main urban road or a motorway - were 7 per cent more likely to develop dementia than those who lived 300 metres away. This increased to 12 per cent for those living at the same address for all 11 years.
Those who lived between 50 metres and 100 metres away had a 4 per cent increased risk, and those between 101 metres and 200 metres had a 2 per cent increased risk. Those living more than 200 metres from a major road had no increased risk, the scientists found.
The results have major implications for Britain which has a population density five to ten times that of Ontario. The UK is also notoriously bad at controlling air pollution, with 37 cities persistently breaching legal limits set by the EU.
Scientists suspect that nitrogen dioxide and the sooty particles generated by diesel engines interfere with the blood-brain barrier, the crucial membrane which stops harmful chemicals entering brain cells.
They also think pollution may provoke inflammation in the brain, a problem which may trigger dementia. Other studies have found that persistent noise is linked to cognitive impairment.
NHS watchdog NICE last month warned air pollution now contributes toward 25,000 deaths a year in England - almost 5 per cent of the total.
Professor Tom Dening, director of the centre for old age and dementia at the University of Nottingham, said: 'It is certainly plausible that air pollution from motor exhaust fumes may contribute to brain pathology that over time may increase the risk of dementia. This evidence will add to the unease of people who live in areas of high traffic concentration.
'It is unlikely that Ontario has the worst air quality in the world, so the risks might be even greater in cities that are habitually wrapped in smog.'
Environmental lawyer Alan Andrews of law firm ClientEarth, which is spearheading a legal case against the Government over air pollution, said: 'This study is the latest to show a worrying link between air pollution and a devastating condition that affects hundreds of thousands of older people in the UK.
'The Government needs to urgently introduce a range of ambitious measures to tackle pollution from diesel vehicles.'