The effective identification and mitigation of non-line-of-sight (NLOS) ranging errors are essential for achieving high-precision positioning and navigation with ultra-wideband (UWB) technology in harsh indoor environments. In this paper, an efficient UWB ranging-error mitigation strategy that uses novel channel impulse response parameters based on the results of a two-step NLOS identification, composed of a decision tree and feedforward neural network, is proposed to realize indoor locations. NLOS ranging errors are classified into three types, and corresponding mitigation strategies and recall mechanisms are developed, which are also extended to partial line-of-sight (LOS) errors. Extensive experiments involving three obstacles (humans, walls, and glass) and two sites show an average NLOS identification accuracy of 95.05%, with LOS/NLOS recall rates of 95.72%/94.15%. The mitigated LOS errors are reduced by 50.4%, while the average improvement in the accuracy of the three types of NLOS ranging errors is 61.8%, reaching up to 76.84%. Overall, this method achieves a reduction in LOS and NLOS ranging errors of 25.19% and 69.85%, respectively, resulting in a 54.46% enhancement in positioning accuracy. This performance surpasses that of state-of-the-art techniques, such as the convolutional neural network (CNN), long short-term memory–extended Kalman filter (LSTM-EKF), least-squares–support vector machine (LS-SVM), and k-nearest neighbor (K-NN) algorithms.