Leandro Barbosa scored 14 of his 26 points in the fourth quarter and the Suns held off the pesky Celtics 118-108.
Amare Stoudemire had 32 points and 12 rebounds, but scored only two points in the fourth quarter as the Suns struggled to avoid a fourth consecutive home loss.
Barbosa was 6-of-7 on 3-pointers, all in the second half. Raja Bell added 20 points and Shawn Marion 17, nine in the fourth quarter when the Suns finally pulled away.
Three players topped 20 points for the Celtics, who lost their 10th in a row on the road and 20th in 21 games overall. Paul Pierce scored 24, Al Jefferson 23 and Ryan Gomes 21. Delonte West added 17 points for Boston.
"I loved their effort," Celtics coach Doc Rivers said of his team. "Honestly, we played a team that's better than us. Having said that, I thought we had the opportunity to win the game."
The Suns made it two victories in two nights after Steve Nash returned from a shoulder injury following the All-Star break. Nash had 14 points and 13 assists.
"We weren't sharp," Nash said. "We just hung in there and made the plays when it counted."
Nash, who had seven turnovers and was off the mark from long range, acknowledged that the shoulder that sidelined him for four games still bothers him.
"I didn't shoot for two weeks," he said. "I'm rusty and I can't really shoot a lot now because my shoulder's still sore and I'm trying not to aggravate it. It's difficult but it's something I've just got to work through right now."
Phoenix plays its next four on the road, starting Friday in Minnesota.
The Celtics, meanwhile, became the second team in the NBA to lose 40 games this season. Memphis was the first.
"Phoenix is a great team," Pierce said. "That's why they're elite. They put a lot of pressure on you with pick-and-rolls and guys that can finish at the basket and guys that can shoot three. They make it tough on you."
Barbosa was 4-of-5 on 3s in the fourth quarter.
"It feels great, you know," Barbosa said of a night when he felt everything he shot would go in. "I was feeling good and the shot was going in. I was comfortable."
Boston trailed only 98-95 after West's inside basket with 6:45 to play, but Marion scored the first six in a 15-6 run that put Phoenix in control for good. Bell's 16-footer capped the outburst and gave the Suns a 113-101 lead with 2:02 to play.
The Celtics cut it to 113-106 on Jefferson's three-point play and Pierce's two free throws, then Barbosa sealed it with his final 3-pointer a minute from the finish.
"Leandro was just incredible down the stretch," Suns coach Mike D'Antoni said. "He hit every big shot. He played well, and Amare was just a beast in there. There were some good things."
Stoudemire scored 18 points and grabbed nine rebounds in the first half to lead the Suns to a 57-46 lead at the break.
Phoenix stretched the lead to 60-46, then the Celtics rallied with a 15-4 surge that cut it to 64-61 when Brian Scalabrine sank a 3-pointer with 7:25 left in third quarter.
The Suns responded with Stoudemire's three-point play, accompanied by Nash's free throw following a technical on Rivers. Nash punctuated the 7-0 spurt with two free throws and it was 73-64 with 5:52 to go in the third.
But Boston scored the last six points of the period to trail just 86-82 entering the fourth. Gomes' 20-footer to start the final quarter cut Phoenix's lead to 86-84 with 10:22 to play. Bell's 3-pointer boosted the lead to 89-84 and the Celtics never got closer than three again.
Notes:@ Boris Diaw missed his fourth consecutive game with back spasms, but D'Antoni said the forward had improved and might be able to play Friday at Minnesota. ... The Suns honored their 1975-76 team that surprisingly advanced to the NBA finals and took te champion Celtics to six games. Players from that team in attendance were Garfield Heard, Ricky Sobers, Dennis Awtry, Dick Van Arsdale, Curtis Perry and Alvan Adams, along with coach John MacLeod. ... Boston outrebounded Phoenix 18-4 in the third quarter. ... The Suns are 21-3 against the Eastern Conference but had lost the last two _ against Atlanta and Chicago _ without Nash.