An anti-hijack machine and an anti-hijack technique in a style of preventing the enemy, the gadget includes a plurality of alarm devices, a displayer, a signal recorder, a magnetic spring lock and a protection device. Wherein each alarm device consists of switches provided on pilot cabin; the alarm tool is connected to the displayer and the signal recorder provided in the cockpit; the magnetic spring lock is supplied at the cabin door of the cockpit; the safety tool is a supply device of Anesthesia gas and oxygen isolatable from the anesthesia gasoline, the retailers of the anesthesia gasoline are dispensed everywhere in the passenger cabin. Anesthesia is a state of controlled, transient loss of sensation or cognizance this is caused for medical functions. It might also include analgesia, muscle relaxation, loss of quick memory, or unconsciousness. During flight, if the passengers locate that hijackers need to or start to act, they are able to spark off the alarm devices right away to observe the individuals within the cockpit directly, the people within the cockpit can rapidly spark off the safety tool to act in opposition to the hijackers. In this way, the occasion of hijacking can be swiftly eliminated earlier than it gets worse.