This paper presents a numerical model for the effect of near-surface inhomogeneities over a one-dimensional horizontally layered geoelectric section and the distortions they cause during magnetotelluric sounding (MTS). The electromagnetic field within the layer of near-surface inhomogeneities is calculated using the Trefftz method. Expressions are derived for the boundary conditions on the day surface and on the roof of the underlying inhomogeneity of a horizontally layered medium. These boundary conditions allow for the excitation of TM-mode fields by subsurface inhomogeneities and their penetration into the atmosphere and the underlying medium. The spatial distribution and characteristics of galvanic and inductive distortions over different time periods during MTS have been studied. Experimental data show that accounting for galvanic distortions is possible with synchronous recording of the distribution of components of the electric and magnetic fields in a limited area of the Earth’s surface.