Charlie Henry saw an effort deflected wide as County looked to double the lead, while down the other end keeper Glyn Thompson had to be alert to keep out Manny Williams' scuffed shot.
Havant tried to find a way back into the game in the second half, but Foley wrapped up the win and ensured promotion on 67 minutes, smashing home from close range after the Gary Warren's header was cleared off the line.
Newport striker Sam Foley: "I'm delighted to get both goals, but it's been a season-long thing, credit to the lads who have kept motivated and kept their eyes on what we needed to do.
Charlie Henry congratulates Sam Foley on the opening goal
"To be the first team promoted in all the divisions is a fantastic feeling.
"We're all aware of the history of this club and you can see what it means to the fans out there.
"It's hard to say how we're going to cope in the league above next season. I've played there and I don't think the teams are that much better than us.
"It's a big ask but I expect we're going to strengthen the team and we have to reward the boys who have done so well this year.
"It will be massive to keep [manager] Dean [Holdsworth] if the club want to keep going in the right direction. He's got the best out of me and a few other players."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.