Studies from past earthquakes have shown that aftershocks can increase the vulnerability of structures damaged under mainshocks. However, the main challenge is to take these threats into account during the process of design and retrofit. Using the accelerograms that are compatible with the mainshock and the corresponding aftershocks can lead to a proper evaluation of seismic performance of a structure during the mainshock and aftershock, based on time history analyses. Therefore, it is necessary to simulate the aftershock motions consistent with the predicted mainshock spectrum. This study first investigates the relationship between the frequency content of an aftershock and its corresponding mainshock. It then discusses the development of a method for the generation of artificial aftershocks based on the acceleration response spectrum obtained from the artificial neural networks. To evaluate the effectiveness of the proposed method for the generation of artificial seismic sequences, a large number of time-history analyses have been conducted using both the current (the conventional back-to-back approach) and the proposed methods for three different structures including a column (representing the pier of a bridge), a reinforced concrete (RC) building, and an RC bridge. In these analyses, a wide range of different elements and materials have been employed and different responses, including maximum drift, residual drift, inter-story drift, floor acceleration, column curvature, and base shear, have also been studied. The results revealed that the proposed method produces the appropriate estimation of structural responses, and has a considerably higher efficiency compared to the conventional BTB approach that often introduces considerably large errors in the estimation of responses.