In this paper, a generalized variable-coefficient KdV equation (vcKdV) arising in fluid mechanics, plasma physics and ocean dynamics is investigated by using symmetry group analysis. Two basic generators are determined, and for every generator in the optimal system the admissible forms of the coefficients and the corresponding reduced ordinary differential equation are obtained. The search for solutions to those reduced ordinary differential equations yields new exact solutions for the generalized vcKdV equation.