Many non-neoplastic diseases have been established to be tumorigenic, and cancers are sometimes misdiagnosed as non-neoplastic diseases. We conducted a comprehensive registry-based study of site-specific cancer diagnosis risk following the diagnosis of any preceding medical condition (PMC) encoded by the International Classification of Diseases (ICD)-10 classification. We analyzed healthcare data and cancer data for a random population-based sample of 2.5 million individuals living in Finland on January 1, 2000. Hazard ratios for each PMC and cancer pair were estimated using piecewise constant hazard regression models. P-values were corrected for multiple testing with the Bonferroni method. Several lifestyle-related PMCs were associated with the risk of cancer diagnosis, exemplified by chronic obstructive pulmonary disease and subsequent lung cancer diagnosis risk (female hazard ratio [HR] = 9.91, 95% confidence interval [CI]: 9.18-19.7, p-adj. < 0.0001; male HR = 5.69, 95% CI: 5.43-5.96, p-adj. < 0.0001). Diagnosis risk of ill-defined cancers appeared to increase following diagnosis of Alzheimer's disease (AD). We identified rare PMCs of potential interest. A considerable proportion of the statistically significant associations were explainable by tobacco smoking and alcohol use. The enrichment of ill-defined cancer diagnoses in persons with AD, together with the overall inverse association between AD and cancer, may reflect underdiagnosis of cancer in this patient population. Our results provide a useful resource for research on the prevention and early detection of cancer.