In this paper, we develop subspace correction preconditioners for discontinuous Galerkin (DG) discretizations of elliptic problems with $hp$-refinement. These preconditioners are based on the decomposition of the DG finite element space into a conforming subspace, and a set of small nonconforming edge spaces. The conforming subspace is preconditioned using a matrix-free low-order refined technique, which in this work we extend to the $hp$-refinement context using a variational restriction approach. The condition number of the resulting linear system is independent of the granularity of the mesh $h$, and the degree of polynomial approximation $p$. The method is amenable to use with meshes of any degree of irregularity and arbitrary distribution of polynomial degrees. Numerical examples are shown on several test cases involving adaptively and randomly refined meshes, using both the symmetric interior penalty method and the second method of Bassi and Rebay (BR2).