Kerogen-rich shale reservoirs will play a key role during the energy transition, yet the effects of nano-confinement on the NMR relaxation of hydrocarbons in kerogen are poorly understood. We use atomistic MD simulations to investigate the effects of nano-confinement on the $^1$H NMR relaxation times $T_1$ and $T_2$ of heptane in kerogen. In the case of $T_1$, we discover the important role of confinement in reducing $T_1$ by $\sim$3 orders of magnitude from bulk heptane, in agreement with measurements of heptane dissolved in kerogen from the Kimmeridge Shale, without any models or free parameters. In the case of $T_2$, we discover that confinement breaks spatial isotropy and gives rise to residual dipolar coupling which reduces $T_2$ by $\sim$5 orders of magnitude from bulk heptane. We use the simulated $T_2$ to calibrate the surface relaxivity and thence predict the pore-size distribution of the organic nano-pores in kerogen, without additional experimental data.