The Himalayan megathrust accommodates most of the relative convergence between the Indian and Eurasian plates, producing cycles of blind and surface-breaking ruptures. Elucidating the mechanics of down-dip segmentation of the seismogenic zone is key to better determine seismic hazards in the region. However, the geometry of the Himalayan megathrust and its impact on seismicity remains controversial. Here, we develop seismic cycle simulations tuned to the seismo-geodetic data of the 2015 Mw 7.8 Gorkha, Nepal earthquake to better constrain the megathrust geometry and its role on the demarcation of partial ruptures. We show that a ramp in the middle of the seismogenic zone is required to explain the termination of the coseismic rupture and the source mechanism of up-dip aftershocks consistently. Alternative models with a wide décollement can only explain the mainshock. Fault structural complexities likely play an important role in modulating the seismic cycle, in particular, the distribution of rupture sizes. Fault bends are capable of both obstructing rupture propagation as well as behave as a source of seismicity and rupture initiation.