His motives remain unclear but the Cypriot president said the incident was not terrorism-related.
Footage released by Egypt’s interior ministry shows the man passing through several security checks at Alexandria’s Borg El Arab airport.
The drama ended with all passengers released unhurt at Larnaca airport and the man giving himself up.
Cypriot officials named the hijacker as Seif Eldin Mustafa and said he was “psychologically unstable”.
Foreign Minister Ioannis Kasoulides said Mustafa had initially asked to speak with his Cypriot ex-wife, who police brought to the airport, before making a series of “incoherent” demands.
Police in Cairo were questioning Mustafa’s relatives, AP news agency reported.
Questions over security
Egypt’s tourism ministry insisted all airport security measures had been “fully implemented” before EgyptAir Flight MS181 to Cairo took off.
CCTV footage released by the interior ministry shows Mustafa being frisked at two security checks and passing a slim bag through x-ray machines.
The BBC’s Youssef Taha says Egypt has taken steps to improve airport security after Russian Metrojet Flight 9268 was blown up over Sinai last October.
They include an extra $1bn a year and a deal with British consultancy Control Risks to review procedures at Cairo, Sharm El-Sheikh and Marsa Alam airports.
Despite this, our correspondent says checks remain inconsistent, with many VIPs and MPs refusing to be searched and airport and airline staff routinely bypassing full security screening.
‘Always a woman involved’
After a standoff lasting several hours, the hijacker walked down aircraft steps and surrendered to Cypriot security forces.
Shortly before that, several people were seen fleeing the aircraft, including one person, apparently a crew member, who climbed out of a cockpit window.
Other passengers had left the plane after appearing to have been released.
Earlier, Cypriot President Nicos Anastasiades had responded to a reporter’s question about whether the hijacker was motivated by romance, by laughing and saying: “Always there is a woman involved.”
EgyptAir said the Airbus A320 was carrying 56 passengers from Alexandria to Cairo, along with six crew and a security official.
A statement from Egypt’s civil aviation ministry said 26 foreign passengers were on board, including eight Americans, four Britons, four Dutch citizens, two Belgians, two Greeks, a French national, an Italian and a Syrian.
Larnaca airport, on the south coast of Cyprus, has been closed and scheduled flights diverted elsewhere.