We present an experimental method for rotating a Bose-Einstein condensate trapped in an axisymmetric magnetic potential. This method is based on the anharmonicity of the trapping potential, which couples the center-of-mass motion of the condensate to its internal motion. By circularly shaking the trapping potential, we generate a circular center-of-mass motion of the condensate around the trap center. The circulating condensate undergoes rotating shape deformation and eventually relaxes into a rotating condensate with a vortex lattice. We discuss the vortex nucleation mechanism and, in particular, the role of the thermal cloud in the relaxation process. Finally, we investigate the dependence of the vortex nucleation on the elliptical polarization of the trap shaking. The response of the condensate is asymmetric with respect to the sign of the shaking polarization, demonstrating the gauge-field effect due to the spin texture of the condensate in the magnetic potential.