Current national seismic hazard models neglect time‐dependent hazard due to triggered earthquakes, although these can certainly generate damaging ground motions. To understand the relative importance of aftershock hazard and risk in the context of a megathrust subduction‐zone earthquake, we develop a new simulation framework for spatiotemporal seismic hazard and risk assessment of a megathrust earthquake and its aftershocks along the plate boundary and in the onshore continental crust. The Tohoku region in northeast Japan is considered as an example to show how the new framework can be implemented to assess the spatiotemporal hazard and risk of aftershocks triggered by an 9 Tohoku‐like earthquake. We generate quasi‐3D synthetic catalogs using an epidemic‐type aftershock sequence (ETAS) model, modified to characterize aftershocks of large and anisotropic finite mainshock sources. By including the 2011 Tohoku mainshock source model, the synthetic catalogs show good agreement with the observed aftershocks. On this basis, and if a mainshock source model is available right after the mainshock, the new simulation framework can be used for quasi‐real‐time aftershock hazard and risk assessments in different subduction zones. For the Tohoku region, we assess the relative importance of subduction‐zone versus onshore‐crustal aftershocks. The results show that the subduction‐zone aftershocks tend to dominate hazard with peak ground velocity (PGV) (the boundary between VIII [severe] and IX [violent] of modified Mercalli intensity). On the other hand, onshore‐crustal aftershocks cause extreme hazards exceeding PGV of . Moreover, on the day of the mainshock, aftershocks contribute about 23% of the onshore hazard with , and the aftershock hazards remain relatively high for 4–5 days, depending on different sites. From a seismic risk viewpoint, the subduction‐zone and onshore‐crustal aftershocks affect buildings differently; both have similar potential to cause minor damage, whereas the latter tends to cause more severe damage.