Three of those scoring strikes went to A.T. Perry and the Demon Deacons snapped a three-game losing streak.
''The last couple of weeks have been tough,'' Wake Forest coach Dave Clawson said. ''We kept working and kept preparing and I'm glad we were able to send our seniors out with a win.''
After trailing 21-10, the Demon Deacons (7-4, 3-4 Atlantic Coast Conference) rattled off the next 35 points. The scoring spree was punctuated by Brendon Harris' 36-yard interception return for a touchdown.
''We fought. Nobody really hung their heads,'' Hartman said. ''It's a good feeling.''
Hartman was 30-for-43 for 331 yards. With 104 career touchdown throws, he's three away from former Clemson quarterback Tahj Boyd's ACC record of 107.
''You kind of get spoiled,'' Clawson said of Hartman's production. ''You almost expect it.''
Syracuse (6-5, 3-4) has lost five games in a row since a torrid start that put the Orange in the national rankings. Sean Tucker ran for two touchdowns and 106 yards on 16 carries and LeQuint Allen threw for a touchdown and caught a touchdown pass. Garrett Shrader was 17 of 31 for 324 yards, a touchdown and an interception.
Hartman connected with Perry for three first-half touchdown plays, including a 10-yarder to take the lead 12 seconds before the break.
Syracuse coach Dino Babers had seen this routine out of Wake Forest's playmakers previously.
''Those guys have got a lot of history together,'' Babers said. ''Sam knows where to put the ball and it's difficult to cover.''
Perry, who caught 10 balls for 119 yards, became the all-time Wake Forest leader for touchdown receptions with 27.
The sequence late in the first half marked a rapid turnaround. Two sacks pushed Syracuse from inside the 10-yard line and resulted in a long field goal attempt falling short. Wake Forest responded for the go-ahead touchdown and never trailed again.
By the end, Wake Forest had 543 yards of total offense.
''The offense really got humming,'' Clawson said. ''That was the offense I expected to see all year.''
Tucker had a 9-yard scoring run for the game's first points and added a go-ahead 2-yard run in the second quarter.
Hartman's 12-yard pass to Perry in the back corner of the end zone gave Wake Forest its first touchdown.
Syracuse used a trick play when Allen, a running back, threw a 33-yard pass to Devaughn Cooper as the Orange built a 21-10 lead.
Tucker eclipsed the 3,000-yard rushing mark for his career.
TAKE IT FROM THEM
Harris' pick-off of Shrader's pass gave Wake Forest's defense an interception for the first time this year in an ACC game. It was just the sixth interception overall for the Demon Deacons.
Harris, a transfer from Vanderbilt, is in his first season with Wake Forest. It was his first career interception.
LET HIM HAVE IT
Syracuse was minus three offensive linemen because of injuries, so the Orange tried some new wrinkles. Among those was finding ways for Allen to get his hands on the ball. He even took direct snaps.
His two receptions accounted for 50 yards after he had 9 receiving yards entering the game.
''I don't know if we were trying to get LeQuint Allen touches,'' Babers said. ''We were just trying to move the football.''
Syracuse: The Orange can't seem to sustain any success and all those good vibes from early in the season have been washed away. Problems on defense have surfaced in recent weeks, and those were magnified with defensive backs unable to make plays to disrupt enough plays in the secondary against Wake Forest.
Wake Forest: The Demon Deacons have spent a couple of weeks out of the Top 25 and they might be able to move back in with a strong finish to the season. They hadn't reached the 40-point mark in any of their past three defeats, so the offense rediscovered some rhythm.
Syracuse: At Boston College next Saturday.
Wake Forest: At Duke next Saturday.
More AP college football: https://apnews.com/hub/college-football and https://twitter.com/ap-top25. Sign up for the AP's college football newsletter: https://tinyurl.com/mrxhe6f2
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.