To investigate the association among comorbidities, sociodemographic factors, and herpes simplex keratitis (HSK). This nationwide, population-based, retrospective, matched case-control study included 27,651 patients with HSK identified from the Taiwan National Health Insurance Research Database based on the International Classification of Diseases, Ninth Revision, Clinical Modification (ICD-9-CM) code 054.42 for dendritic keratitis and 054.43 for herpes simplex disciform keratitis. The age-, sex-, and index date-matched control group included 27,651 non-HSK individuals selected from the Taiwan Longitudinal Health Insurance Database 2000. Associations between HSK, sociodemographic conditions, and comorbidities were examined using univariate logistic regression analyses, and paired t-tests were used for continuous variables. Adjusted logistic regression was used to compare odds ratios (OR) for HSK development. Patients with corneal abrasion were more likely to develop HSK than controls [OR, 402.80; 95% confidence interval (CI), 167.47–968.79; P < 0.0001] even after conditional logistic regression (adjusted OR, 407.36; 95% CI, 169.35–979.89; P < 0.0001). Other conditions that increase the odds of HSK development include systemic diseases such as hyperlipidemia, diabetes mellitus, coronary artery disease, chronic renal disease, and human immunodeficiency virus infection. Regarding sociodemographic factors, >50% of patients with HSK were aged ≥55 years. Moreover, patients living in Northern Taiwan and metropolitan cities had higher odds of developing HSK. HSK is significantly associated with corneal abrasion, hyperlipidemia, diabetes mellitus, coronary artery disease, chronic renal disease, and human immunodeficiency virus infection.