In order to enhance the response speed of the permanent magnet synchronous motor(PMSM) in cranes and the robustness of the system, an improved index law was proposed. The new sliding mode control(NSMC) in the speed loop was adopted based on field-oriented control(FOC). A new function f(s) was introduced to enhance the response speed at which the system state variables approached the sliding mode surface. The sign function sign(s) was replaced by a continuous function h(s) to reduce the chattering caused by the discontinuity of the sign function. A new extended state observer(NESO) was designed to observe disturbances and further optimize the speed controller. The fal(s) function in traditional observer was replaced by a nonlinear smooth function K(s) to eliminate chattering and improve the observation accuracy of the observer. The results show that the motor speed is stable at approximately 0.05 s after starting, with a speed oscillation of about 10 r/min. It verifies the correctness of the controller algorithm. The designed algorithm can effectively improve the response speed of the system and provide reference for the control of PMSM in cranes.