Aftershocks have the potential to further aggravate the damage of masonry structures caused by mainshock. To quantitatively analyze the effect of aftershocks, this paper investigates the seismic response of unreinforced masonry structures subjected to mainshock-aftershock (M-A) sequences. Firstly, an analytical method for estimating the maximum storey drift of masonry structures subjected to M-A sequences is proposed, which is based on the non-iterative equivalent linearization method and the soft-storey failure mechanism of multi-storey masonry structures. Then, a finite element method is employed to verify the effectiveness of the proposed method. Finally, a parametric analysis is performed to evaluate the effects of aftershock intensity, anti-seismic wall area ratio, site classes, number of storeys, and mortar strength on the seismic responses of masonry structures subjected to M-A sequences, respectively. The results indicate that an excellent agreement for the maximum storey drift (theta(max)) between analytical and numerical results. The effect of aftershocks on masonry structures in plastic phase is more distinct than that in elastic phase. Furthermore, the effect of aftershocks on the theta(max) of masonry structures can be ignored when the relative intensity of aftershock is less than 0.5, and the theta(max) can increase by approximately 19.0% when the relative intensity of aftershock is equal to 1.0. Additionally, for the masonry structures subjected to M-A sequences, the effects of site classes on the theta(max) cannot be ignored, the theta(max) can decrease with increasing anti-seismic wall area ratio and mortar strength, and increases with increasing number of storeys.