The invention discloses an electromagnetic door lock of electrical equipment. The electromagnetic door lock comprises a slider block device, a starter, a mechanical sensor and a mechanical linkage device, wherein the slider block devices is moved to a closing position along with shutoff of a door of the electrical equipment, the starter is used for providing power for switching on and switching off a switch device, the mechanical sensor is used for determining the closing position of the slider block device (20), when the slider block device is not located at the closing position, the starter is locked by the mechanical linkage device, and when the slider block device is located at the closing position, the starter is released by the mechanical linkage device, so that the switch device is located at a switch-on position. The mechanical sensor and the mechanical linkage device not only control the electromagnetic door gate in use of the electrical equipment, but lock movable components in the electromagnetic door gate in a transportation process so as to prevent the movable components from playing in the transportation process, and avoid from causing the components of the electromagnetic door lock in an abnormal state.