Media playback is not supported on this device
Bryant has scored 32,683 points during a 20-year career with the LA Lakers to rank third on the NBA's all-time list.
The two-time Olympic gold medallist, 37, has been hindered by injuries in recent seasons and has been below his best this year for the Lakers.
He told the Players' Tribune: "My body knows it's time to say goodbye."
Bryant has averaged more than 25 points per game in his 1,293 NBA matches.
Should the Lakers fail to make the end-of-season play-offs, his final game is set to be at home against Utah on 13 April.
The Lakers have won just two of their 16 matches so far this season, with Bryant averaging 15.7 points per game.
In a poem entitled 'Dear Basketball', Bryant announced "this season is all I have left to give".
The Philadelphia-born player added: "You gave a six-year-old boy his Laker dream. And I'll always love you for it. But I can't love you obsessively for much longer."
He ended the poem without hinting at what he might do next.
"We both know, no matter what I do next, I'll always be that kid, with the rolled up socks, garbage can in the corner, :05 seconds on the clock, ball in my hands," he wrote.
Bryant was named the NBA's Most Valuable Player in 2008 and selected for the NBA All-Star team on 17 occasions.
He won Olympic gold with the United States in 2008 and 2012.
Lakers coach Byron Scott said he thought Bryant would have played on for at least another season.
"It kind of shocked me when he told me," said Scott. "I'm sad more than anything. Somebody I care about, have a lot of respect for... it's always hard when greatness like Kobe decides to hang it up.
"For him to be able to go around to all these cities and them to be able to appreciate him for what he has accomplished is great."
Lakers president Jeanie Buss added: "We're all sad. This era of Lakers basketball has been one of the most fun, exciting, prosperous eras we could imagine.
"We're in full support of him. But it's still very sad."
Five-time NBA champion Kobe Bryant, widely regarded as one of the greatest basketball players in history, will retire at the end of the season.