The future Hall of Fame forward made the announcement Tuesday night after the Mavericks' regular-season home finale over the Phoenix Suns.
"As you guys might expect, this is my last home game," Nowitzki told the crowd, which gave him a standing ovation.
"This is obviously super, super emotional. There's just too many people to really thank," Nowitzki said. "I put you guys on a hell of a ride, with a lot of ups and downs, and you guys always stuck with me and supported me so I appreciate it."
Nowitzki spent his entire 21-year career with the Mavs, guiding the franchise to its first NBA championship in 2010-11. His 21 seasons with a single team are an NBA record.
Nowitzki won the league's MVP award in 2006-07 and was named Finals MVP in the Mavericks' 2011 title victory over LeBron James and the Miami Heat. He ranks sixth in NBA history with more than 31,000 career points.
The Milwaukee Bucks originally selected Nowitzki, a native of Germany, in the first round of the 1998 NBA Draft. The Bucks traded the 7-foot forward to the Mavericks in a draft-night trade.
Nowitzki's postgame ceremony also included NBA legends Scottie Pippen, Charles Barkley, Larry Bird, Shawn Kemp and Detlef Schrempf. After Nowitzki's speech, Dallas owner Mark Cuban thanked the Mavericks icon and promised him a statue to honor his career.
Before Nowitzki's final home game began, the organization played a tribute video for the 40-year-old and 14-time All-Star. He proceeded to score his team's first 10 points in the opening three minutes and dropped a season-high 30 points.
Nowitzki's historic career wraps up Wednesday on the road against the San Antonio Spurs.