BackgroundWhile cognitive impairment after stroke is common, cognitive trends before stroke are poorly understood, especially among the Chinese population who have a relatively high stroke burden. We aimed to model the trajectories of cognitive function before and after new-onset stroke among Chinese.MethodsA total of 13,311 Chinese participants aged ≥ 45 years and without a history of stroke were assessed at baseline between June 2011 and March 2012 and in at least one cognitive test between 2013 (wave 2) and 2018 (wave 4). Cognitive function was assessed using a global cognition score, which included episodic memory, visuospatial abilities, and a 10-item Telephone Interview of Cognitive Status (TICS-10) test to reflect calculation, attention, and orientation abilities.ResultsDuring the 7-year follow-up, 610 (4.6%) participants experienced a first stroke. Both stroke and non-stroke groups showed declined cognitive function during follow-up. After adjustment for covariates, there was no significant difference in pre-stroke cognitive trajectories between stroke patients and stroke-free participants. The stroke group showed an acute decline in episodic memory (− 0.123 SD), visuospatial abilities (− 0.169 SD), and global cognition (− 0.135 SD) after stroke onset. In the years following stroke, the decline rate of the TICS-10 test was higher than the rate before stroke (− 0.045 SD/year).ConclusionsChinese stroke patients had not experienced steeper declines in cognition before stroke compared with stroke-free individuals. Incident stroke was associated with acute declines in global cognition, episodic memory, visuospatial abilities, and accelerated declines in calculation, attention, and orientation abilities.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12916-023-02908-5.