The invention discloses a method for controlling rotational speed of a compressor of an air conditioner. The method comprises the process of controlling the compressor according to real-time angular velocity and moment. The process of controlling the compressor according to the real-time angular velocity comprises the following steps of: performing filtering treatment on axis errors, so as to obtain an angular velocity compensation quantity; according to the angular velocity compensation quantity, obtaining a compensated angular velocity output quantity; and according to the compensated angular velocity output quantity, and amending the real-time angular velocity, and controlling the compressor. The process of controlling the compressor according to moment comprises the following steps of:calculating the difference between a target angular velocity fluctuation quantity and a compensated angular velocity output quantity, so as to obtain a first angular velocity difference value; performing filtering treatment on the first angular velocity difference value, so as to obtain a filtering angular velocity; inputting the filtering angular velocity to a speed ring regulator, so as to obtain an output moment; according to the first angular velocity difference value, obtaining the moment compensation quantity; and according to the moment compensation quantity and the output moment, obtaining the compensated output moment and controlling the compressor. Through the adoption of the method disclosed by the invention, the restraining validity of the rotational speed fluctuation of the compressor can be improved.