As it transpired, even a win would not have been enough for Australia, however, with Denmark claiming the point they needed against France to join Didier Deschamps's side in the knockout round of the competition.
Mile Jedinak had the game's first half-chance in the fifth minute, but the midfielder's effort was always rising over the Peru crossbar as Australia made the better start to events in Sochi.
It was Peru that made the breakthrough in the 18th minute, however, when Carrillo's sensational volley from a Guerrero cross ended up in the bottom corner of the net.
Tom Rogic then had a wonderful chance to level in the 28th minute after dancing past a couple of challenges inside the Peru box, but the Celtic midfielder could not poke the ball past goalkeeper Pedro Gallese.
Leckie had another opportunity for Australia 10 minutes before the end of the first period, but the attacker just could not meet a low cross from Robbie Kruse, with two Peruvian defenders sliding in to turn the ball behind.
Peru doubled their lead early in the second period, however, when Guerrero, who almost missed the 2018 World Cup through a doping ban, hooked the ball into the back of the Australia net from inside the box.
Jedinak headed into the arms of Gellese in the period that followed, while Tim Cahill also came off the Australia bench - replacing the ineffective Juric in the process.
The Socceroos continued to threaten as Behich had one deflected just wide on the hour mark, before Daniel Arzani missed the crossbar with a dipping effort in the 67th minute.
Jedinak also sent a free kick over the Peru goal 10 minutes from time, but the South Americans were comfortable as they closed in on the three points which ultimately saw them claim third spot in the group.
Peru could have stretched their advantage on the counter-attack in the latter stages, but a couple of misplaced passes saw the match finish 2-0, with both countries exiting the 2018 World Cup.
AUSTRALIA (4-3-3): Ryan; Risdon, Sainsbury, Milligan, Behich; Mooy, Rogic (Irvine 72'), Jedinak; Leckie, Juric (Cahill 53'), Kruse (Arzani 58')
PERU (4-2-3-1): Gallese; Advincula, Ramos, Santamaria, Trauco; Yotun (Aquino 45'), Tapia (Hurtado 63'); Carrillo (Cartagena 79'), Cueva, Flores; Guerrero