The Portugal star now wants to go by the name of Faisal Xavier and will embark on humanitarian projects after failing to find a club.
He last played for LA Galaxy in 2008 and he has now decided to give up on his career.
Xavier, 37, joined Liverpool from Everton in 2002 and scored twice in 21 appearances.
He moved to Major League Soccer club LA Galaxy to play out the final games of his career alongside David Beckham.
Xavier said: 'It's an emotional goodbye and I hope to participate in something very satisfying in a new stage of my life.
'In moments of grief, I have found comfort in Islam. Slowly, I learned a religion that professes peace, equality, freedom and hope. These are foundations with which I identify.'