To better quantify the relatively long period (< 0.3 Hz) shaking experienced during the 2015 Gorkha (Nepal) earthquake sequence, we study the finite rupture processes and the associated 3D ground motion of the Mw7.8 mainshock and the Mw7.2 aftershock. The 3D synthetics are then used in the broadband ground shaking in Kathmandu with a hybrid approach, summarized in a companion paper (Chen and Wei, 2017, submitted together). We determined the coseismic rupture process of the mainshock by joint inversion of InSAR/SAR, GPS (static and high-rate), strong motion and teleseismic waveforms. Our inversion for the mainshock indicates unilateral rupture towards the ESE, with an average rupture speed of 3.0 km/s and a total duration of ~ 60 s. Additionally, we find that the beginning part of the rupture (5–18 s) has about 40% longer rise time than the rest of the rupture, as well as slower rupture velocity. Our model shows two strong asperities occurring ~ 24 s and ~ 36 s after the origin and located ~ 30 km to the northwest and northeast of the Kathmandu valley, respectively. In contrast, the Mw7.2 aftershock is more compact both in time and space, as revealed by joint inversion of teleseismic body waves and InSAR data. The different rupture features between the mainshock and the aftershock could be related to difference in fault zone structure. The mainshock and aftershock ground motions in the Kathmandu valley, recorded by both strong motion and high-rate GPS stations, exhibited strong amplification around 0.2 Hz. A simplified 3D basin model, calibrated by an Mw5.2 aftershock, can match the observed waveforms reasonably well at 0.3 Hz and lower frequency. The 3D simulations indicate that the basin structure trapped the wavefield and produced an extensive ground vibration. Our study suggests that the combination of rupture characteristics and propagational complexity are required to understand the ground shaking produced by hazardous earthquakes such as the Gorkha event