Both satellite observations and kinetic simulations of quasi-parallel shocks have revealed the existence of large-amplitude low-frequency plasma waves in the upstream as well as the occurrence of magnetic reconnection in the downstream, however, their relations is still unclear. In this paper, with the help of two-dimensional (2-D) particle-in-cell (PIC) simulation model, we investigate the long-time evolution (near one hundred of ion gyroperiods) of a quasi-parallel shock. Part of upstream ions are reflected by the shock, and then low-frequency magnetosonic waves with the wavelength tens of the ion inertial lengths are excited in the upstream. Detailed analyses have indicated that the dominant wave mode is excited due to the resonant ion-ion beam instability. Although the plasma waves are directed toward the upstream in the upstream plasma frame, they are brought by the upstream plasma flow toward the shock front and their amplitude is enhanced during the approaching. The interaction of the upstream plasma waves with the shock leads to the cyclic reformation of the shock front, and the reformation period is slightly larger than 10 gyroperiods. When crossing the shock front, these large-amplitude plasma waves are compressed and evolve into current sheets in the transition region of the shock. At last, both ion-scale and electron-scale magnetic reconnection can occur in these current sheets, accompanying with the generation of magnetic islands. Our simulation provides the explanation for the generation process of magnetic reconnection, which has been recently observed by the satellite observations in the downstream of the Earth’s bow shock.