Mascherano, the most capped player in Argentina’s history having made 147 appearances for the national side, made the announcement in a press conference at his current club, Estudiantes.
Mascherano said: “I want to announce that today I am retiring from soccer professionally.
“I want to thank this club that gave me the opportunity to finish my career in Argentina.”
After a controversial move to West Ham in 2006, Mascherano moved on to Anfield, where he made 139 appearances in a successful three-year spell.
Mascherano then won two Champions League crowns and a pair of Club World Cup titles with Barcelona, along with five wins each in LaLiga and the Copa del Rey,
He was a key part of the Argentina side that reached the final of the 2014 World Cup, where they lost to Germany, and also involved in four Copa America final defeats without ever lifting the trophy, though he did win gold medals at both the 2004 and 2008 Olympic Games.
Additional reporting by PA.