A method for the detection of underground anomalies by electromagnetic (EM) shock waves is presented. Following Grischkowsky et al. [Phys. Rev. Lett., vol. 59, pp. 1663-1666, 1987, an EM shock wave will develop in a dielectric medium by exciting a pulse which leaks into the dielectric bulk from a transmission line. A shock wave occurs when the group velocity in the line exceeds the phase velocity in the dielectric. This mechanism is similar to Cherenkov radiation. In this paper the transmission and reception of the EM shock wave between two identical leaky transmission lines is introduced. For underground detection, the two lines are placed in boreholes and are made in a manner in which the speed of propagation in the line is faster than the speed of propagation in the ground. The effect on the shock wave by an underground anomaly such as a dielectric or metallic pipeline located between the two boreholes is studied. The anomaly scatters the shock wave, resulting in a detectable disturbance in the received signal. The time delay of this disturbance, with respect to the time when the pulse was transmitted, is correlated with the location of the object. Numerical examples are presented by using a two-dimensional finite-difference time-domain algorithm.