ObjectivesTo investigate delivery of smoking cessation interventions, recorded quit attempts and successful quitting rates within primary care in smokers with depression or severe mental illness (SMI) compared with those without.DesignLongitudinal cohort study using primary healthcare records.SettingEnglish primary care.Participants882 849 patients registered with participating practices recorded as current smokers during 2007–2014, including three groups: (1) 13 078 with SMI, (2) 55 630 with no SMI but recent depression and (3) 814 141 with no SMI nor recent depression.OutcomesRecorded advice to quit smoking, referrals to smoking cessation services, prescriptions for smoking cessation medication, recorded quit attempts and changes of smoking status.ResultsThe majority (>70%) of smokers had recorded smoking cessation advice. This was consistently higher in those with SMI than the other cohorts of patients, although the gap greatly reduced in more recent years. Increases in smoking cessation advice over time were not accompanied by increases in recorded attempts to quit or changes of smoking status. Overall nicotine replacement therapy prescribing by general practitioners (GPs) was higher in those with SMI (10.1%) and depression (8.7%) than those without (5.9%), but a downward time trend was observed in all groups. Bupropion and varenicline prescribing was very low and lower for those with SMI. Few smokers (<5%) had referrals to stop smoking services, though this increased over time, but no significant differences were observed between those with and without mental health problems.ConclusionsThere was no evidence of consistent inequalities in access to GP-delivered smoking cessation interventions for people with mental health conditions. Smoking cessation advice was widely reported as taking place in all groups. In order to address the widening gap in smoking prevalence in those with poor mental health compared with those without, the emphasis should be on addressing the quality of advice and support given.