In this paper, an accurate borehole radar imaging method based on deep learning is proposed for sparse target detection in nonuniform subsurface medium. With aid of the a-prior medium layout information, a sparse target extractor is derived, whose output is connected to the designed deep-learning-based autoencoder (AE) for sparse target location correction, which is trained by multiple radar echo datasets in simulation scenes. The results validate its high accuracy and universal effectiveness in diverse target imaging under various medium circumstances.