A novel, highly efficient and accurate adaptive higher-order finite element method (hp-FEM) is used to simulate a multi-frequency resistivity logging-while-drilling (LWD) tool response in a borehole environment. Presented in this study are the vector expression of Maxwell’s equations, three kinds of boundary conditions, stability weak formulation of Maxwell’s equations, and automatic hp-adaptivity strategy. The new hp-FEM can select optimal refinement and calculation strategies based on the practical formation model and error estimation. Numerical experiments show that the new hp-FEM has an exponential convergence rate in terms of relative error in a user-prescribed quantity of interest against the degrees of freedom, which provides more accurate results than those obtained using the adaptive h-FEM. The numerical results illustrate the high efficiency and accuracy of the method at a given LWD tool structure and parameters in different physical models, which further confirm the accuracy of the results using the Hermes library (http://hpfem.org/hermes) with a multi-frequency resistivity LWD tool response in a borehole environment.