The nonlinear dynamic characteristics of a pile embedded in a rock were investigated. Suppose that both the materials of the pile and the soil around the pile obey nonlinear elastic and linear viscoelastic constitutive relations. The nonlinear partial differential equation governing the dynamic characteristics of the pile was first derived. The Galerkin method was used to simplify the equation and to obtain a nonlinear ordinary differential equation. The methods in nonlinear dynamics were employed to solve the simplified dynamical system, and the time-path curves, phase-trajectory diagrams, power spectrum, Poincaré sections and bifurcation and chaos diagrams of the motion of the pile were obtained. The effects of parameters on the dynamic characteristics of the system were also considered in detail.