“This has been the toughest decision of my life, one both me and my family have agonised over for a good deal of time,” said the ex-England midfielder.
He added he would continue to play but not for a potential rival as he could “never contemplate” facing Liverpool.
He stressed: “I won’t be playing for a competing club and will not therefore be lining up against Liverpool.
“My decision is completely based on my wish to experience something different in my career and life and I also want to make sure that I have no regrets when my playing career is eventually over.
“From now until the last kick of the last game of the season, I will be as fully committed to the team as I ever have been and giving everything I have to help Liverpool win games.”
Gerrard led the club to the Champions League title in 2005, scoring his side’s first goal as they came from three down to draw 3-3 against AC Milan and then win on penalties.
He has also won the Uefa Cup, two FA Cups, three League Cups, one Community Shield and two Uefa Super Cups, and earned 114 England caps before retiring after the World Cup.
Liverpool manager Brendan Rodgers said: “It is almost an impossible task to find the words to appropriately sum up Steven Gerrard and his importance to Liverpool.
“This is an era where the word ‘legend’ is vastly overused, but in his case it actually doesn’t do him justice.”
Liverpool striker Rickie Lambert, a boyhood supporter of the club, described Gerrard as “Mr Liverpool”.