Conservative Christian Thom Tillis outlasts incumbent Kay Hagan, whose loss is a black eye for Obama, and a repudiation of Senator Harry Reid.
Tillis had 48.9% and Hagan had 47% of the vote with 97% of the state's precincts reporting, according to the state Board of Elections.
The Associated Press called the race for Tillis.
The campaigns made no immediate comment.
The race pitted Tillis, the speaker of the GOP-controlled state House, against Hagan, a one-term Democrat with a record of backing President Obama and his health care law.
The Affordable Care Act, generally, has not been popular in North Carolina.
Voters who backed Tillis said they wanted change.
"I think we are on a course to doom," said Paula Crowther outside Roberson High School in Skyland, N.C. "I am really worried about it. All the policies that have been worked on for the last eight years have to change and it was important to me to help make a change."
Pharmacist Kristi Johnson, 36, said she eventually settled on Tillis even though neither candidate excited her.
"I examined my beliefs and what I figure was the better good and chose my candidate based on that even though personally I didn't love the candidate that I chose," said Johnson, who works at Rex Hospital.
Democratic voter Ron Burrus said the Senate race was his main motivation for casting a ballot at the Wesley Grant Center in Asheville.
"He cut jobs with the teachers, abortion, Medicaid — we need people who help the state of North Carolina. I just don't think we're going the right direction with Tillis," he said.
At a polling place in Raleigh near the State Fairgrounds and N.C. State University, plumbing contractor Steve Rhodes said he voted for Hagan because he believed a GOP majority in the Senate would be a disaster.
"Just so many things I'm against with the Republicans; they've gone too far," said Rhodes, 56. "I'm more moderate. And I used to be a Republican."
He said he's an unaffiliated voter now, having left the GOP about eight years ago because he didn't like the party's support for war.
The campaigns headed into Tuesday's election continuing to trade blows.
The Tillis campaign, late Monday, blasted Hagan for a radio advertisement featuring an endorsement from Obama.
The president has been absent from the race. He narrowly won the state in 2008, but lost it in 2012.
Libertarian Party nominee Sean Haugh also was on the ballot.
In total, the candidates and outside groups have spent an estimated $100 million, according to the Associated Press.
Hagan outspent Tillis by a nearly 3-to-1 ratio entering the campaign's final weeks.
Contributing: The Associated Press. Ostendorff also reports for the Asheville (N.C.) Citizen-Times.