In this paper, the nonsimilarity boundary-layer flows of second-order fluid over a flat sheet with arbitrary stretching velocity are studied. The boundary-layer equations describing the steady laminar flow of an incompressible viscoelastic fluid past a semi-infinite stretching flat sheet are transformed into a partial differential equation with variable coefficients. An analytic technique for highly nonlinear problems, namely, the homotopy analysis method, is applied to give convergent analytical approximations, which agree well with the numerical results given by the Keller box method. Furthermore, the effects of physical parameters on some important physical quantities, such as the local skin-friction coefficient and the boundary-layer thickness, are investigated in detail. Mathematically, this analytic approach is rather general in principle and can be applied to solve different types of nonlinear partial differential equations with variable coefficients in physics.