The spread of infectious diseases is a major challenge in our contemporary world, especially after the recent outbreak of Coronavirus disease 2019 (COVID‐19). The quarantine strategy is one of the important intervention measures to control the spread of an epidemic by greatly minimizing the likelihood of contact between infected and susceptible individuals. In this study, we analyze the impact of various stochastic disturbances on the epidemic dynamics during the quarantine period. For this purpose, we present an SIQS epidemic model that incorporates the stochastic transmission and the Lévy noise in order to simulate both small and massive perturbations. Under appropriate conditions, some interesting asymptotic properties are proved, namely, ergodicity, persistence in the mean, and extinction of the disease. The theoretical results show that the dynamics of the perturbed model are determined by parameters that are closely related to the stochastic noises. Our work improves many existing studies in the field of mathematical epidemiology and provides new techniques to predict and analyze the dynamic behavior of epidemics.