Evidence of a role of vitamin D in the immune system is increasing. Low serum vitamin D is associated with increased hepatitis B virus replication. Genome-wide association study (GWAS) data has revealed a number of the single nucleotide polymorphisms (SNPs) within the vitamin D synthetic pathway that affect vitamin D functions. We aimed to determine the association between SNPs in the vitamin D gene cascade and response to pegylated interferon (PegIFN) therapy in hepatitis B e-antigen (HBeAg)-positive patients. One hundred and eleven patients treated for 48 weeks with PegIFN-alfa 2a at 13 hospitals were retrospectively evaluated. Thirteen SNPs derived from vitamin D cascade-related genes, including DHCR7 (rs12785878), CYP27B1 (rs10877012), CYP2R1 (rs2060793, rs12794714), GC (rs4588, rs7041, rs222020, rs2282679), and VDR (FokI, BsmI, Tru9I, ApaI, TaqI), were genotyped. Thirty-one patients (27.9%) seroconverted to HBeAg after 24 weeks of treatment. Multivariate analysis found pretreatment qHBsAg <10,000 IU/mL (OR = 7.73, 95% CI: 2.36-25.31, P = 0.001), CYP2R1 rs12794714 TT genotype (OR = 4.16, 95% CI: 1.07-16.25, P = 0.04), and baseline ALT >2 times the upper limit of normal (OR = 3.83, 95% CI: 1.31-11.22, P = 0.014) predicted sustained HBeAg seroconversion after completion of PegIFN treatment. HBV DNA during study period tended to be lower with the rs12794714 CYP2R1 TT than the non-TT genotype. The rs12794714 CYP2R1 polymorphism may be a useful pretreatment factor predictive of sustained HBeAg seroconversion after PegIFN therapy. This study provides evidence that not only vitamin D level but also genetic variation of CYP2R1 in the vitamin D cascade influences host immune response in chronic HBV infection.