"This will be my last ride," Lewis, 37, said in a statement.
The AFC North champion Ravens are hosting the Indianapolis Colts on Sunday in the opening round of the playoffs, but it was not yet certain Lewis would be activated for the game.
Lewis has not played since he tore his triceps during a Week Six win over the Dallas Cowboys in October.
The inside linebacker, twice the NFL Defensive Player of the Year and most valuable player in Baltimore's 2001 Super Bowls, issued his statement after addressing team mates.
"I can't picture Baltimore without him," running back Ray Rice told reporters about the Ravens' first-round pick of the 1996 NFL draft, who spent his entire 17-year career with the Ravens.
As word of Lewis's retirement spread tributes poured in from across the league on social media from both past and present players.
"I'd like to take a moment to honor a great career and player in @raylewis a worthy opponent," praised Detroit Lions Hall of Fame running back Barry Sanders on his Twitter account.
"Best Overall LBer and Leader in NFL history," echoed former-New York Giants linebacker Antonio Pierce.
Lewis has long been the inspirational heart of the Ravens, firing up the team mates as they huddled around him before the opening kickoff, and then leading by example with his furious play on the gridiron.
"I talked to my team today and I talked to them about life in general. Everything that starts has an end. It's just life," said Lewis, who said he was at peace with his decision and was looking forward to spending more time with his two sons.
"I've done it, man. There's no accolade that I don't have individually but I've never played the game for individual stats. I've only played the game to make my team be a better team."
Lewis went from a scary low to the heights of the National Football League in one year after he was held in an Atlanta jail in the early morning hours after the 2000 Super Bowl, linked to a double-killing outside a nightclub.
By May, the matter was settled when Lewis pleaded guilty to a misdemeanor charge of obstruction of justice and was fined $250,000 by the NFL.
One year after the fatal incident, Lewis was named MVP of Baltimore's Super Bowl triumph over the New York Giants in Tampa as the unquestioned leader of a defense that set a record for fewest points allowed in a 16-game season.
Lewis said he intends to play when the Ravens host the Colts in what would likely be his last game in Baltimore, since the team enters the playoffs as the fourth-seeded team in the AFC.
His next football stop is bound to be in Canton, Ohio, for enshrinement to the Pro Football Hall of Fame.
- American Football
- Sports & Recreation