Recent studies have shown a close link between viral infections and cholesterol metabolism. Here, we reported that 7-dehydrocholesterol reductase (DHCR7), a terminal enzyme for catalyzing cholesterol synthesis in the Kandutsch-Russell pathway, is harnessed by enterovirus A71 (EV-A71) benefitting for its replication. Overexpression of DHCR7 resulted in upregulating of EV-A71 replication, while the S14A mutation, which reduces DHCR7 enzyme activity, has no effect on EV-A71 replication. Knockdown of DHCR7 expression with small interfering RNA (siRNA) or enzyme activity inhibition with pharmacological inhibitor AY9944 could significantly inhibit EV-A71 replication. Adding cholesterol to DHCR7 knockdown cells or AY9944-treated cells could rescue EV-A71 replication. More importantly, prophylactic administration of AY9944 effectively protected mice from lethal EV-A71 infection. In addition, the natural cholesterol precursor 7-dehydrocholesterol (7-DHC), which is converted to cholesterol by DHCR7, has a similar effect against EV-A71 infection. Mechanistically, AY9944 or 7-DHC treatment can specifically promote IRF3 phosphorylation to activate interferon response. Moreover, AY9944 effectively cleared coxsackievirus B3 (CVB3) and coxsackievirus A16 (CVA16) infections in vitro. In conclusion, pharmacological modulation of DHCR7 might provide a chance for treatment of enterovirus infection, including EV-A71.