The invention discloses a method and device of controlling the rotating speed of a compressor. The method comprises the steps that an axis error which reflects the deviation between the practical position and the presumptive position of a compressor rotor is acquired; the axis error is subjected to filtering treatment, so that a corrected axis error which is formed after at least one part of the axis error fluctuation is filtered away and the angular speed compensation quantity which corresponds to the corrected axis error are obtained; the angular speed compensation quantity compensates for the output angular speed of a phase-locked loop regulator in a phase-locked loop of the compressor, so that the compensated angular speed output quantity is obtained; meanwhile, the output angular speed of the phase-locked loop regulator is inputted into a speed loop regulator in a speed loop by serving as the input quantity; and the real-time angular speed for compressor control is corrected according to the compensated angular speed output quantity, and the compressor is controlled according to the corrected real-time angular speed and the output torque of the speed loop regulator. By use ofthe method and device, the effectiveness of suppression of the rotating speed fluctuation of the compressor can be improved.