Background: We investigated the correlation between a history of human papillomavirus (HPV) infection and alopecia areata risk. Methods: The study cohort comprised 30,001 patients with newly diagnosed HPV infection between 2000 and 2012; and with use of computer-generated randomly numbers, patients not had HPV infection were randomly selected as the comparison cohort. HPV infection cohort were matched to comparison individuals at a 1:1 ratio by age, gender and index year. All study individuals were followed up until they developed alopecia areata, withdraw from the insurance program, lost to follow-up, or until the end of 2013. Cox proportional hazards regression analysis was used to analyze the risk of alopecia areata with hazard ratios (HRs) and 95% confidence intervals (CIs) between the HPV and control cohort. Results: The adjusted hazard ratio (aHR) of alopecia areata for HPV patients relative to controls was 2.55 (95% C. I. = 1.88?3.47) after adjusting sex, age and comorbidities. Subgroup analysis indicated that patients with HPV infections had a significantly greater risk of alopecia areata for both genders, all age subgroups, and those with mental disorder diseases. Conclusions: A history of HPV infection is associated with the development of subsequent alopecia areata in Taiwanese subjects.