A mathematically rigorous closed‐form solution is presented for the surface motion of a half‐space under P, SV, and Rayleigh waves scattered by a semicylindrical canyon using the complex variable function method. The scattered wave potentials are obtained in terms of the image method. With the aid of the conformal mapping technique, the half‐surface in the original is mapped onto a semicircumference in the transformed plane. The boundary conditions along the half‐surface are expressed in the transformed domain. The boundary conditions along the canyon surface are formulated in the original domain. The boundary value problem, once integrated along the corresponding angular weights, leads to a series of linear algebraic equations with respect to the unknown coefficients, which can be solved straightforwardly. The convergence of the solution results is tested by truncating the series number. The accuracy of the proposed solution is examined by comparing the present results with those using numerical methods. A parametric study is performed to evaluate the effects of the geometry of the canyon and the material properties on the dynamic response of the domain.