The braking torque of an elevator with contactor star sealing or conventional electronic star sealing is decreased at medium and high speeds, to ensure safe and effective braking when the elevator loses control in the medium and high speeds scenario, an electronic star sealing method based on optimal resistance is proposed in this paper, where the braking torque can be enhanced by the original drive system without any additional devices. The braking characteristic varies with different stator resistance when the conventional contactor star sealing is employed. By analyzing the relationship between phase voltage and current with a fixed PWM (pulse-width modulation) duty during electronic star sealing, the relationship between virtual resistance and PWM duty is disclosed. Then, it dynamically changes the PWM duty based on the current amplitude, DC-link voltage and rotational speed, thereby changing the equivalent resistance of the permanent magnet synchronous traction machine, and ensuring that it is equal to the optimal resistance for the maximum braking torque, so as to enhance the braking torque. Finally, the feasibility and correctness of the proposed method were verified through experiments, and the braking torque at medium and high speeds is increased significantly compared with the conventional electronic star sealing.