The 34-year-old midfielder revealed his decision in the immediate aftermath of Saturday's 4-3 last-16 defeat by France.
Speaking to reporters shortly after the final whistle, Mascherano said: "It's time to say goodbye and for the younger players to step in.
Argentina had come from a goal down in Kazan to lead 2-1 lead early in the second half but France rallied to seal a 4-3 victory, Kylian Mbappe's second-half double proving decisive.
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.
He played 334 times for Barcelona before leaving at the end of last season for China to join Hebei China Fortune. SHARE THIS STORY USING ANY OF THE BUTTON BELOW ⬇ PLACE YOUR TEXT ADVERT BELOW ⬇⬇⬇