The 36-year-old had been playing for Estudiantes in his native Argentina.
He won the Champions League twice and La Liga five times during a successful eight-year period at Barcelona.
“I want to announce that today i’m retiring from soccer professionally. i would like to thank this club that gave me the chance to end my career in Argentina,” he said on Sunday .
Read also: Barcelona FC eyes Paris Saint-Germain star
Mascherano made 147 appearances for Argentina and commenced his career at Argentine club River Plate.
He played for West Ham from 2006 to 2007, leaving to hitch Liverpool where he featured within the 2007 Champions League final defeat by AC Milan.
Mascherano played for Barcelona from 2010 to 2018 before a spell with Chinese club Hebei China Fortune.
Follow us on Twitter: @oyogist