From the kick-off, the ball was lofted forward to the two-metre striker and he slammed it into the far corner of the net from the edge of the box.
Onuachu impressed with his nimble footwork and physicality and was a constant threat to the Egyptians until substituted with two minutes remaining.
Egypt have been African champions seven times and Nigeria on three occasions and they will be among the favourites to win the 2019 Africa Cup of Nations which Egypt are hosting.
Morocco, another country set to be strong contenders for the African title, fell 1-0 at home against Lionel Messi-less Argentina with Angel Correa scoring a late winner.
The match in northern coastal city Tangier was spoilt by windy conditions and numerous fouls led to four yellow cards.
Liverpool star Sadio Mane came off the bench to turn the tide for Senegal in a 2-1 win over Mali in Dakar.
He equalised three minutes from time and set up the stoppage-time winner for Moussa Konate in a friendly between former Cup of Nations runners-up.
Algeria edged Tunisia 1-0 in a clash of ex-Cup of Nations winners with Baghdad Bounedjah converting a penalty midway through the second half.
The match was staged in Blida, 45 kilometres (28 miles) southwest of Algiers, where the Algerian national team has not lost since 2002.
Twice African champions the Ivory Coast left it late to edge Liberia 1-0 in Abidjan with Jonathan Kodjia converting a 90th-minute penalty.
Ghana, whose last of four Cup of Nations titles came 37 years ago, were ahead within two minutes en route to a 3-1 victory over Mauritania in Accra.
Kwesi Appiah scored off an early penalty and two goals in two minutes during the second half from Caleb Ekusan and Thomas Partey won the match after Adama Ba had levelled.