Natural disasters arouse threats of health and economic damage, altering consumer behavior in both the short term and the long term. By adapting coping theory to health and economic threats, this study examines the heterogeneous impacts of epidemic disasters, in the COVID-19 pandemic context, on online consumer demand by product type and their dynamics after stabilization. Our results show that the local epidemic outbreak initially increased (decreased) the online demand for essential (discretionary) goods, but the increased purchasing of essential goods diminished as the associated risks were alleviated, whereas the decreased demand for discretionary goods persisted. Additional analyses reveal that engaging more with online consumers during disastrous periods helps retain a specific type of consumer even after stabilization. Our findings highlight the role of threats as psychological drivers in changing online demand, providing managerial implications for online retailers on how to convert threat-driven consumers into regular customers afterward.