Background The potential relationship between anaesthesia, surgery and onset of dementia remains elusive. Aims To determine whether the risk of dementia increases after surgery with anaesthesia, and to evaluate possible associations among age, mode of anaesthesia, type of surgery and risk of dementia. Method The study cohort comprised patients aged 50 years and older who were anaesthetised for the first time since 1995 between 1 January 2004 and 31 December 2007, and a control group of randomly selected patients matched for age and gender. Patients were followed until 31 December 2010 to identify the emergence of dementia. Results Relative to the control group, patients who underwent anaesthesia and surgery exhibited an increased risk of dementia (hazard ratio = 1.99) and a reduced mean interval to dementia diagnosis. The risk of dementia increased in patients who received intravenous or intramuscular anaesthesia, regional anaesthesia and general anaesthesia. Conclusions The results of our nationwide, population-based study suggest that patients who undergo anaesthesia and surgery may be at increased risk of dementia.