The Irish needed to win to progress from Pool B but Juan Saldino's close-range finish put Argentina ahead.
John Jermyn levelled but Ireland were soon behind again as Gonzalo Peillat netted just before half-time.
Shane O'Donoghue made it 2-2 before Peillat scored his second penalty corner goal to end Ireland's first Olympic hockey appearance since 1908.
A draw was enough for Argentina to make the last eight and Saldino set them on their way as he pounced to net after a Peillat penalty corner was blocked on the line.
Argentina forced successive penalty corners in the first quarter but Irish goalkeeper David Harte was in superb form as he repeatedly denied the South Americans.
Ireland improved in the second quarter and Jermyn fired high into the net from a penalty corner with six minutes left in the second quarter.
It was 2-1 just two minutes later as Peillat finally found a way past Harte, who made an excellent double-save in the third quarter while Argentina hit the woodwork.
O'Donoghue rattled in a penalty corner with nine minutes left to restore Irish hopes of a memorable victory.
However, Paillet delivered a clinical strike within seconds to earn Argentina victory while ensuring Ireland finished fifth in Pool B.
Ireland missed out on a place in the Olympic Games quarter-finals after going down 3-2 to Argentina in Rio.