Davis threw for 376 yards and two touchdowns for the Pirates (4-2), who survived a thrilling finish with their instate rival in front of a sellout and record home crowd. East Carolina ran out to a 21-0 first-quarter lead only to see the Wolfpack rally to take the lead late in the fourth quarter on a field goal from Josh Czajkowski before staging its own comeback.
Michael Barbour's field goal with 1:04 left sent the game into overtime, where Davis put the Pirates ahead for good by bouncing off a pile of tacklers on a sneak and falling across the goal line.
The Wolfpack (5-2) couldn't answer, with Wilson forcing a pass over the middle to Jarvis Williams that Magazu grabbed at the goal line.
Almost immediately, the East Carolina sideline spilled onto the field to celebrate in front of the roaring home crowd in the newly finished end zone section of Dowdy-Ficklen Stadium.
It was quite a finish for the Pirates considering the game appeared to be slipping away only moments earlier. East Carolina committed countless mistakes, from 10 penalties to a pair of costly fumbles that both set up a touchdown for the Wolfpack and ended another drive just as the Pirates were crossing the goal line.
And yet, the Pirates figured out a way to beat N.C. State, a team that had won seven of 10 matchups with the state's four other Bowl Subdivision opponents under coach Tom O'Brien. That included two meetings with the Pirates.
Lance Lewis and Justin Jones had touchdown catches for the Pirates, while Jon Williams had a 5-yard TD run to cap East Carolina's first possession. The Pirates finished with 496 total yards, while their struggling defense hung in against Wilson and the Wolfpack's strong passing game.
Wilson threw for 322 yards and one touchdown to go with a rushing score, but he threw three interceptions and was charged with a fumble on a botched handoff with Mustafa Greene late in the first half.
adidas Men's NC State Wolfpack Red Sideline Coaches PoloPrice: $44.97 Shop
Running back Devontae Booker had 124 combined yards and a touchdown and Utah spoiled Jim Harbaugh's Michigan coaching debut, beating the Wolverines 24-17 on Thursday night.
ESPN 300 running back Elijah Holyfield, the son of former heavyweight boxing champion Evander Holyfield, has decided to stay home and attend Georgia, he announced Friday.
Arizona star linebacker Scooby Wright will have an MRI after injuring his left knee in the first quarter of the Wildcats' season-opening 42-32 win over UTSA on Thursday night.
Miami reserve linebacker Al-Quadin Muhammad has been suspended for the season opener against Bethune-Cookman on Saturday for a violation of team rules, a source confirmed to ESPN.com
Trevone Boykin threw for 246 yards and a touchdown and ran for 92 yards and another score to help No. 2 TCU outlast Minnesota 23-17 on Thursday night.
All-American defensive end Shawn Oakman and safety Orion Stewart have been suspended for Baylor's season opener Friday against SMU for a violation of team rules, a school spokesman told ESPN.com.