Indoor localization with high accuracy plays a key role in the field of Internet of Things in 5th-Generation (5G) era. With the introduction of Multiple Input Multiple Output (MIMO) technology in 5G, the direction-of-arrival (DOA) method is highly feasible in indoor localization. However, the direction of arrival is susceptible to complex indoor environment. To improve the accuracy and stability of DOA estimation, an adjacent angle power difference (AAPD) method is proposed based on Orthogonal Matching Pursuit (OMP). This method uses OMP to obtain an initial estimate of the direction, and then, adjusts the estimation by calculating the difference power of adjacent points at initial value point to get the fractional DOA. In the scenario of continuous movement, beamforming is further applied, which reduces the amount of calculation. Both simulation and experimental results show that the proposed method can achieve high accuracy and eliminate the error jitter. Compared with the classical Multiple Signal Classification (MUSIC) method for DOA estimation, the proposed method can increase accuracy by 46% under the condition of low SNR (Signal-to-Noise Ratio). The probability that the measurement error does not exceed 5° in the actual movement tests is 97.5%.