The Wizards (4-25) took a 14-point lead early in the second quarter before Dallas rallied. The Mavs trailed by four at the half before outscoring the Wizards 35-19 in the third quarter to take an 83-71 lead.
"It's been a rough two weeks," coach Rick Carlisle said.
The Mavericks have tried to work Dirk Nowitzki back into the lineup, and in his fifth game back after right knee surgery the former league MVP scored 11 points.
"The locker room is miserable. The coaches are miserable when we lose, so it definitely is one we wanted to get," Nowitzki said.
The Mavericks were ahead 99-84 with 3:28 to play, but Washington scored eight straight to cut the lead to seven. Carter, making only his second start of the season, followed with an emphatic dunk with 1:11 to play to make it 101-93.
Carter began the game with a dunk, and the one that secured the win was reminiscent of his high-flying prime.
"The body felt good. Sometimes when I go to dunk, the next couple of plays, I'll stay away from the rim. So, I felt good. I was in attack mode. Those were plays that were needed," Carter said.
Carter will be 36 later this month, but his play doesn't surprise Carlisle.
"He shows flashes of those things more frequently than you might think. The play to open the game was a key play for us because it kind of woke our whole team up and I thought it got us going in the right direction. The play at the end of the game was pivotal because I thought it sealed the game," Carlisle said.
"He said to me coming off the court during the timeout, he goes: 'Bet you didn't think I could do that.'
Six players scored in double figures for Dallas. Chris Kaman scored 12 and Shawn Marion had 11 points with a season-high 14 rebounds.
Bradley Beal equaled a career high with 22 points for the Wizards. Emeka Okafor had 14 points and 11 rebounds, and Martel Webster also scored 14.
Dallas arrived in Washington in the midst of its longest losing streak since a seven-game slump from Feb. 9-19, 1999 during Nowitzki's rookie season. The Mavs hadn't been losing close games, either, with only one loss during the recent slide coming by single-digits. The six losses came by an average of 19 points.
"It's been crazy, man. Not winning, and we all lose sleep, all a little stressed out, and a little tense," Mayo said.
NBA champions just two seasons ago, the Mavs haven't missed the playoffs since 2000 and looked to be a team in turmoil. Carlisle was so upset after Sunday's 25-point loss to San Antonio, he threatened suspensions to underperformers, a threat he dismissed before the game. He did institute a dress code for team charters, banning sweat suits and insisting on at least business-casual attire.
"Losing is not something we're used to in this franchise, in this organization. The fans are used to it, to a lot more," Nowitzki said.
The Wizards outrebounded the Mavericks 20-8 in the first quarter as they took a 29-23 lead and ended a 10-0 run with a 37-23 advantage with just over two minutes gone in the second quarter. Dallas clawed back with a 7-0 run to go into halftime trailing 52-48.
"We had a great start. They have experience, they have good players right there. We wake up the beast, Nowitzki started making shots. Vince Carter looked like the young Vince Carter," Washington forward Nene said.
Just before Washington left the court, coach Randy Wittman took reserve center Kevin Seraphin aside to hector him for allowing Kaman three easy baskets late in the half.
Dallas recalled G Jared Cunningham from the D-League, but he was inactive, as was C/F Brandan Wright with a quad strain. ... The Wizards gave out bobbleheads depicting Beal. ... Washington has lost six in a row to the Mavericks. ... While the Mavericks were introduced, the strains of "Hail to the Redskins" were played.