An analytical approach is developed for the calculation of the dynamical Goos–Hanchen (GH) shift in a layered dielectric structure, which provides waveguiding of a high-quality-factor leaky eigenmode and lateral energy transfer. The analysis is based on the master equation for slow amplitude of the mode excited by impinging light, and it allows us to relate reflected and transmitted fields to the incident radiation in a general case of nonlinear and non-stationary processes. The corresponding numerical calculations demonstrate giant GH shifts for the reflected and transmitted beams. It is shown that the value and sign of the GH shift for the reflected and transmitted beams can be controlled by the incident field intensity and/or incident pulse duration.