An a posteriori error estimator for the error in the (L 2 (H 1 )+L ∞ (L 2 ))-type norm for an interior penalty discontinuous Galerkin (dG) spatial discretisation and backward Euler temporal discretisation of linear non-stationary convection–diffusion initial/boundary value problems is derived, allowing for anisotropic elements. The proposed error estimator is used to drive an hp-space–time adaptive algorithm wherein directional mesh refinement is employed to give rise to highly anisotropic elements able to accurately capture layers. The performance of the hp-space–time adaptive algorithm is assessed via a number of standard test problems characterised by sharp and/or moving layers.