The basic equations for a nonlocal thermoelastic–viscoelastic medium are formulated based on the multi‐phase‐lag model with a fractional derivative heat transfer. Using suitable nondimensional variables, the problem is solved using the Fourier series and Laplace transforms to solve the problem of a thermal shock problem to obtain the exact expressions of physical fields. The numerical results obtained have been illustrated graphically to illustrate the effect of the initial stress, gravity, nonlocal parameter, two‐temperature parameter, and time‐fractional derivative parameter on the physical variables.