Graham threw three touchdown passes, including two to Ahmarean Brown, and Georgia Tech stopped a potential tying 2-point play with about five minutes remaining to beat North Carolina State 28-26 on Thursday night.
Graham also ran for 129 yards with a touchdown as Georgia Tech (3-8, 2-6 Atlantic Coast Conference) snapped a three-game losing streak that included a 45-0 loss to Virginia Tech on Saturday.
Graham, who was pulled from the lopsided loss to the Hokies, wasn't leaving the win over the Wolfpack.
"Especially after last week he had something to prove," said wide receiver Malachi Carter, who had two catches for 74 yards. "He just went out there and did his thing."
N.C. State (4-7, 1-6) suffered its fifth straight loss.
Graham helped the Yellow Jackets gain 395 yards -- a dramatic improvement from their 134 yards in the loss to Virginia Tech.
Even so, Georgia Tech had to withstand N.C. State's comeback after leading 21-3 at halftime and 28-13 to start the fourth quarter.
The Wolfpack rallied on Devin Leary's 4-yard touchdown pass to Cary Angeline and Ricky Person's 1-yard scoring run.
"I thought the guys played their butts off in the second half," said N.C. State coach Dave Doeren. "We just did too many things in the first half that made it difficult to win."
Person's run, with 5:17 remaining, cut the Yellow Jackets' lead to two points.
N.C. State's 2-point try failed. Leary rolled to his right before stopping to throw to tight end Cary Angeline on the left side of the field. But Leary had no time to set his feet because of the pressure from Christian Campbell and the pass fell incomplete.
"He was running away from me," Campbell said of Leary. "He had no idea I was behind him, so as soon as he turned to square up I was in his face."
On the game's first play, Graham threw a 54-yard pass to Carter. Two plays later, Graham found Brown in the right side of the end zone for a 17-yard touchdown pass.
Graham's 13-yard scoring pass to former starting quarterback Tobias Oliver gave the Yellow Jackets a 14-0 lead -- their first two-touchdown advantage of the season.
N.C. State: The Wolfpack gained 457 yards in a strong offensive performance, including 230 on the ground. Zonovan Knight ran for 100 yards and Jordan Houston added 89. Still, it wasn't enough to end the losing streak as the defense gave up 266 yards rushing.
Georgia Tech: Graham lost two fumbles but posted big production with 112 yards rushing and 129 yards passing. Jordan Mason ran for 141 yards and couldn't be stopped as the Yellow Jackets held the ball for the final 5 minutes.
Brown's two touchdowns on his only two catches gave him seven for the season to match Georgia Tech's freshman record set by Calvin Johnson in 2004.
FINALLY, FORCED TURNOVERS
N.C. State entered the game ranked last among 130 FBS teams with five forced turnovers, including none in ACC games. The Wolfpack ended the ACC drought with two takeaways.
The drought ended when Justice Dingle sacked Graham, forcing a fumble recovered by Ja'Quon Griffin at the N.C. State 15 late in the first quarter. Graham's second lost fumble early in the fourth quarter was recovered by Larrell Murchison. That set up Leary's 4-yard touchdown pass to Angeline, trimming Georgia Tech's lead to 28-20.
N.C. State will try to stretch its three-game winning streak against state rival North Carolina on Nov. 30.
Georgia Tech will close its season against No. 4 Georgia on Nov. 30. It will be the Yellow Jackets' third straight home game. Georgia has won two straight, eight of the last 10 and 15 of the last 18 in the series.
More AP college football: https://apnews.com/Collegefootball and https://twitter.com/AP-Top25
Georgia Tech QB keeps it himself for the TD
Georgia Tech QB James Graham calls his own number and rushes 26 yards into the end zone for a touchdown.