While Human Papillomavirus (HPV) particles have been detected in a small proportion of benign thyroid nodules or thyroid cancer cases, a role of HPV in these thyroid conditions has not been established. This study aims to investigate the association of HPV infection with thyroid cancer (TC) using a nationwide population-based study. We retrieved data for this case–control study from Taiwan's Longitudinal Health Insurance Database 2010. The study sample included 3062 patients with TC and 9186 propensity-scored matched controls. We employed multivariate logistic regression models to quantitatively evaluate the association of TC with HPV infections after taking age, sex, monthly income, geographic location and urbanization level of the patient's residence, diabetes, hypertension, and hyperlipidemia into considerations. Chi-squared test revealed that there was a significant difference in the prevalence of prior HPV infections between patients with TC and controls (15.3% vs. 7.6%, p < 0.001). The adjusted odds ratio of prior HPV infections for patients with TC was 2.199 (95% CI = 1.939–2.492) relative to controls. The adjusted ORs of prior HPV infections for patients with TC was similar for males and females. Our research suggests a significant link between HPV infection and the development of TC.