The Chelsea forward scored the first past Sisay Bancha after 80 minutes and the second past outfield player Addis Hintsa who had to go in goal after the keeper was sent off for bringing down Moses in the box in the 85th.
Ethiopia had already used all three substitutes in their final Group C match and finished with 10 men for the second time in the competition after keeper Jemal Tassew was also dismissed in their opening match with Zambia.
The high drama at the end of the game at the Royal Bafokeng Sports Palace was in sharp contrast to what had gone before.
Both teams had a chance of qualifying for the last eight but in the first half neither played with much urgency.
Nigeria began to exert their superiority over Ethiopia in the closing stages against the lowest-ranked country (110th) here although they rarely looked convincing.
The Nigerians dominated for most of the match but had little to show for their 13 first-half goal attempts as most of the efforts carried no threat.
Ethiopia, whose coach Sewnet Bishaw made eight changes from the side that lost 4-0 to Burkina Faso, were even less inspiring and barely troubled Nigeria goalkeeper Vincent Enyeama.
The game became more stretched as it went on and in the end Nigeria were deserved winners as Moses kept his cool in two high-pressure penalty situations.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO Sports and on Facebook at AhramOnlineSports)