To increase reservoir-encounter drilling ratio while horizontal directional drilling, this paper presents a novel LWD tool based on the high frequency electromagnetic wave, which can get the accurate distance between the drilling tools and reservoir boundary. While horizontal directional drilling in the reservoir, the LWD tool mentioned transmits a modulated single-frequency pulse, the pulse width is about 10ns and the central frequency is about 350MHz, by the transmitting antenna. The high frequency electromagnetic wave is reflected on the interface of the reservoir and the cap because of the dielectric difference. The reflected wave can be captured by the receiving antennas and then be processed in the designed algorithm aiding in ranging the distance of the reservoir boundary in real time. A 2.0*1.0*0.7 meters clay sand, concrete ground and a saline bag with the conductivity in 60mS/cm are designed to simulate the situations likely to be in real horizontal directional drilling operations and to evaluate the detection capability of the LWD tool in a controlled situation. Under the different conditions and distances, the measurement range of the LWD tool is about 0.7∼2.0 meters and the accuracy is less than ±3 centimeters, a high accuracy for geosteering in horizontal directional drilling, which will be greatly helpful to keep the drilling bit drilling in the optimum position of oil or gas reservoir all the time to increase the reservoir-encounter drilling ratio.