Mooy's Australia needed to beat Peru today and hope that the Danes lost to group-favourites France in order to progress in the competition.
The Socceroos however lost to the South American side 2-0 and finished bottom of Group C.
Former Watford loanee Andre Carrillo and 88-time capped captain Paolo Guerrero netted for the Incas, who claimed their first win since the 1978 competition in Argentina.
Mooy played all 90 minutes for the Aussies, but couldn't turn the game in their favour.
Denmark couldn't beat France in their match, but claimed a respectable goalless draw against one of the pre-tournament favourites.
Zanka started his first World Cup match as Denmark and France played out the first goalless match of the 2018 tournament, with the Town man performing well to keep Didier Deschamps' incredibly talented forward line at bay.
The Town centre back played the full match - receiving a yellow card for a challenge on Antoine Griezmann - while Lossl did not make it off the bench.
Denmark will now face Croatia or Nigeria in the Round of 16, with the European side being the most likely outcome.
In order for the Danes to face the African nation, Nigeria would have to beat Argentina and hope Iceland claimed a large enough victory over Croatia to swing the goal difference.