Tobias Harris scored 23 points and Arron Afflalo had 20 for the Magic, who are 1-22 on the road since mid-December and an NBA-worst 4-32 away from home for the season.
Orlando, already without Jameer Nelson (sore left knee), lost center Nicola Vucevic when he drew two quick technical fouls and was ejected with 2:32 left in the first quarter. Vucevic had eight points in 9 minutes when he was tossed.
The first technical came for arguing that he was fouled when Frye blocked his shot. The second came when he threw the ball at Frye after the Phoenix forward drew an offensive foul on him.
''He's a load down there,'' Frye said, ''so I just tried to do what I could do, and he didn't like it.''
The win left the Suns 1 game behind Dallas and Memphis for the final two playoff spots in the Western Conference.
Neither team led by more than seven before the Suns' big run took off late in the third quarter.
With the game tied at the break, coach Jeff Hornacek told his players it was time to look like a team that belonged in the postseason.
''I told them to just get after it and go take the team if you want to be a playoff team,'' he said, ''and that's what they did.''
Marcus Morris hit a pair of 3s as Phoenix outscored the Magic 8-1 to end the third quarter after Orlando had taken its first lead of the second half, 73-72 on Andrew Nicholson's inside basket with 1:57 left in the period. The Magic still led, 75-74, when Harris made two free throws 20 seconds later.
Morris made a 3, Dragic scored on layup off a Magic turnover, then Morris made another 3, with 2.9 seconds left in quarter.
Green stretched the run to 14-1 with two 3s to open the fourth quarter, then added another moments later. By the time Markieff Morris made a 15-footer, the Suns were up 97-78 with 7:45 left. Phoenix led by as many as 21 after that.
Green had struggled with his shot before he hit those three big ones.
''I just had to stay with it,'' he said. ''I was going to get shots up and I knew I was going to be able to get open and try to make plays.''
The Magic, losers at Golden State on Tuesday night, scored the first six points of the game, and that was the biggest lead of the half for either team. The score was tied at 25 after one and at 52 at the break.
Frye scored the first five in a 7-0 spurt to start the second half to put Phoenix up 59-52 on P.J. Tucker's fast-break layup. Miles Plumlee's dunk on a feed from Dragic had Phoenix up 65-58 with 6:18 left in the third. However, Afflalo's four-point play capped a 9-2 run that tied it at 67 with 3:34 remaining in the period.
''They came out and really pushed it at us,''' Orlando coach Jacque Vaugn said. ''We helped them a little bit by tying to make it complicated instead of the simple play. We will continue to stress that. A lot of times the simple play is good enough.''
NOTES: Orlando's lone road win since Dec. 16 was at Philadelphia on Feb. 26. ... Only five of the Suns' remaining 14 games are at home. ... Vucevic's first technical came for arguing after Frye blocked his shot, and his second after he threw the ball at Frye after the Suns' forward drew an offensive foul. ... The game was Orlando's second stop on a four-game road trip. ... Orlando joined Milwaukee and Philadelphia as 50-game losers.