This paper investigates the problem of wireless power transmission in underground pipeline detection systems. In response to the fact that during the study of the underground pipeline detection system, the coil inductance value changes due to environmental and anthropogenic factors, making the system detuned and unable to effectively acquire the underground microtag ID signal. Therefore, we raised a novel capacity compensation method to solve the problem mentioned above. Firstly, the hardware structure of the system is modelled, derived and analysed with the system in a resonant state. The topology applied to the system is then subjected to capacitive compensation operations to obtain the power transfer efficiency of the system in the resonant state with the best topology model. Finally, it is demonstrated through functional tests that the capacitive compensation of the optimal topology model achieves a good power transfer performance and acquires an effective ID signal.