The G ′ G -expansion method is introduced to construct more general exact travelling wave solutions to the generalized KdV–mKdV equation with any-order nonlinear terms. As a result, hyperbolic function solution, trigonometric function solution and rational solution with parameters are obtained. When the parameters take up special values, the solitary waves are also derived from the travelling wave solutions. The G ′ G -expansion method presents a wider applicability for handling nonlinear wave equations.