In this paper, the method of magnetic poles shifting was combined with optimization method to reduce cogging torque in solid-rotor permanent-magnet synchronous motors. Although the finite-element method (FEM) can calculate the cogging torque accurately, to find the peak value of cogging torque, the cogging torque for different relative positions between permanent magnets and slots must be calculated; thus, the optimization will take a long time. To reduce optimization time, a novel analytical method was proposed to determine the initial value and feasible range of the shifting angles. Then the optimization method and FEM were used to minimize the cogging torque. Two prototype motors were analyzed and optimized, respectively. It was proved that the cogging torque can be greatly reduced by the proposed method.