Abstract: An apparatus for controlling a motor driving an opening and closing body of a sunroof device includes a drive portion and a control portion. The drive portion supplies current to the motor to rotate the motor. The drive portion has a changing device for changing the torque of the motor. The control portion controls the changing device such that the torque of the motor is increased as the traveling speed of a vehicle is increased during a closing operation of the opening and closing body. Therefore, closure force and catching force of the opening and closing body during a closing operation is optimized.