2H solid-state NMR represents a reliable method for probing the dynamics of the molecules in confined geometries, including microporous and mesoporous materials such as zeolites or metal–organic frameworks (MOFs). Dynamic characteristics derived from analyses of 2H NMR line shape and spin relaxation for adsorbed deuterated molecules can be related with translational motions along the porous framework. This opens up the possibility to use 2H NMR for probing self-diffusion within porous materials. Herein we discuss the basic principles and approaches that can be used to derive the information on diffusion coefficients based on analysis of the dynamics of confined molecules by 2H NMR. We discuss the corresponding possibilities and limitations of 2H NMR compared to other experimental methods, such QENS and PFG NMR. Several examples for estimation of diffusion coefficients by 2H NMR for alkanes, olefins, alcohol, benzene, pyridine in zeolites and MOFs are provided.