The M6.4 earthquake that took place on the 20 April 2015 off the shore of eastern Taiwan was the largest event in the vicinity of Taiwan during 2015. The mainshock was located in the southern Ryukyu subduction zone, which is the interface between the Philippine Sea Plate and the Eurasian Plate. People in Taipei experienced strong ground shaking for more than 40 s, even though the epicenter was located more than 150 km away. In order to understand the origin of ground motions from this earthquake and how it caused such strong shaking in Taipei, a numerical earthquake model is analyzed, including models of source rupture and wave propagation. First, a joint source inversion was performed using teleseismic body wave and local ground motion data. Source inversion results show that a large slip occurred near the hypocenter, which rapidly released seismic energy in the first 2 s. Then, the rupture propagated toward the shallow fault plane. A large amount of seismic energy was released during this rupture stage that slipped for more than 8 s before the end of the rupture. The estimated stress drop is 2.48 MPa, which is consistent with values for subduction zone earthquakes. Forward simulation using this inverted source rupture model and a 3D seismic velocity model based on the spectral-element method was then performed. Results indicate that the strong ground motion in Taipei resulted from two factors: (1) the Taipei basin amplification effect and (2) the specific source radiation pattern. The results of this numerical earthquake model imply that future subduction zone events that occur in offshore eastern Taiwan are likely to cause relatively strong ground shaking in northern Taiwan, especially in the Taipei metropolitan area.