In this paper, we present a new approach to hp-adaptive finite element methods. Our a posteriori error estimates and hp-refinement indicator are inspired by the work on gradient/derivative recovery of Bank and Xu (SIAM J Numer Anal 41:2294–2312, 2003; SIAM J Numer Anal 41:2313–2332, 2003). For element τ of degree p, R(∂ p u hp ), the (piece-wise linear) recovered function of ∂ p u is used to approximate $${|\varepsilon|_{1,\tau} = |\hat{u}_{p+1} - u_{p}|_{1,\tau}}$$ , which serves as our local error indicator. Under sufficient conditions on the smoothness of u, it can be shown that $${\|{\partial^{p}(\hat{u}_{p+1} - u_{p})\|_{0,\Omega}}}$$ is a superconvergent approximation of $${\|(I - R){\partial}^p u_{hp}\|_{0,\Omega}}$$ . Based on this, we develop a heuristic hp-refinement indicator based on the ratio between the two quantities on each element. Also in this work, we introduce nodal basis functions for special elements where the polynomial degree along edges is allowed to be different from the overall element degree. Several numerical examples are provided to show the effectiveness of our approach.