The 34-year-old made his decision following Saturday's dramatic 4-3 defeat to France in Kazan in the last 16 of the tournament.
Argentina took a 2-1 lead early in the second half at the Kazan Arena but three French goals in 11 minutes saw the Albiceleste's campaign in Russia come to an end despite a late Sergio Aguero strike.
Speaking to reporters shortly after the final whistle, the Hebei China Fortune player said: "It's time to say goodbye and for the younger players to step in.
"Hopefully in the future these kids can achieve something. Now I'm just one more fan of the national team."
Mascherano, who has played at four World Cups, made his debut for Argentina in 2003 and has made a record 147 appearances for his country.