The invention discloses a separating and unlocking mechanism based on a rotating electromagnet and a separating and unlocking method.The separating and unlocking mechanism comprises an upper cylinder, a lower cylinder, a locking device, a rotating device, a pushing device, a driving device, a limiting pin, a loading nut and a microswitch, the lower cylinder is sleeved with the upper cylinder, the rotating device is installed on the driving device and can rotate along with the driving device, and the pushing device is installed on the lower cylinder; the locking device transversely penetrates through the upper cylinder and the lower cylinder and abuts against the rotating device, the upper cylinder and the lower cylinder are locked together, when the driving device receives a satellite separation signal, the rotating device is driven by the driving device to rotate from the abutting position to the disengaging position, abutting between the rotating device and the locking device is relieved, the locking device is disengaged from the upper cylinder, and the upper cylinder and the lower cylinder are locked together. The upper cylinder and the lower cylinder are unlocked, the upper cylinder is ejected out under the action of the pushing device, and satellite-rocket separation is completed. The problems that a satellite-rocket separation mechanism is complex in structure, high in cost, large in envelope size, heavy in weight and the like are solved.