A novel approach for a wireless transmission of MWD and LWD signals in lossy formations has been proposed in this paper. First, the quasi-TEM mode of the extremely low frequency (ELF) near field is excited by a voltage gap on the pipe, guided by and propagated along the metal pipe string in LWD or MWD (logging/measurement while drilling) environment. Once the signal received on the ground is weaker than a certain threshold as the drilling depth increases, a relay segment (transceiver) is installed into the pipe string to receive, amplify, and retransmit the signals to extend the transmission distance and ensure the required propagation range of the ELF wave. In this paper, the details of the transceiver antennas and the relay segment suitable for efficient coupling to quasi-TEM mode have been given first, and then, the numerical simulations of the ELF wave propagation in LWD or MWD environment and the coupling between the guided wave and the relay segment have been made to show the coupling performance of the relay segment to quasi-TEM mode quantitatively. It has been shown that the propagation attenuation of the ELF near field with the guidance of the metal pipe string is much less than that of the space wave in the same lossy media without the guidance of the pipe string, and the scheme of the wireless relay provides an efficient way to extend the propagation range of the EM telemetry evidently and open a new freedom of frequency optimization for wireless transmission systems.