An emerging body of research suggests that noncentral nervous system cancer may negatively impact the brain apart from effects of cancer treatment. However, studies assessing cognitive function in newly diagnosed cancer patients cannot exclude selection bias and psychological effects of cancer diagnosis. To overcome these limitations, we investigated trajectories of cognitive function of patients before cancer diagnosis. Between 1989 and 2013, a total of 2059 participants from the population-based Rotterdam Study were diagnosed with noncentral nervous system cancer. Cognitive assessments were performed every 3 to 5 years using a neuropsychological battery. The general cognitive factor was composed of individual cognitive tests to assess global cognition. Using linear mixed models, we compared change in cognitive function of cancer case patients before diagnosis with cognitive change of age-matched cancer-free control subjects (1:2). In addition, we performed sensitivity analyses by discarding assessments of control subjects 5 years before the end of follow-up to exclude effects from potential undiagnosed cancer. All statistical tests were two-sided. The Word Learning Test immediate recall declined faster among case patients than among control subjects (-0.05, 95% confidence interval = -0.09 to -0.01 vs 0.01, 95% confidence interval = -0.01 to 0.03; P for difference = .003). However, this difference was not statistically significant in sensitivity analyses. Furthermore, no statistically significant differences were observed in change of other individual cognitive tests and of the general cognitive factor. In this study, we evaluated cognitive function in a large group of cancer patients prior to diagnosis, thereby excluding the psychological impact of cancer diagnosis and biased patient selection. In contrast to previous studies shortly after cancer diagnosis, we found no difference in change of cognitive function between cancer patients and control subjects.