The invention discloses a method and a system for controlling the operation of a car sunroof. The method comprises the following steps of: dividing the operating parameter of the movement of the sunroof into at least two sections according to a preset rule, and obtaining a target voltage value corresponding to each section and expected to be outputted to a motor; obtaining the power voltage value of a current section, calculating the duty ratio corresponding to the current section according to the power voltage value of the current section and the target voltage value of the current section, wherein the target voltage value of the current section is expected to be outputted to the motor; and controlling the soft starting and the soft stopping of the motor according to the duty ratio of the current section. According to the invention, the voltage inputted to the motor is slowly increased or reduced, so that the operation of the sunroof is controlled, and the condition that because of the noise and vibration brought by the sudden starting and stopping of the motor, the comfort reduction of a customer is reduced when the customer takes a car is reduced. Otherwise, during the process of the soft stopping, the target voltage in stopping is reduced because of the multi-time soft stopping method, so that the inertial forward-rushing distance when the motor commands the stopping under various working conditions is effectively controlled, and the position control precision of the stopping of the sunroof is improved.