Confirmation that terms had been agreed with O'Neill followed a board meeting of the Irish Football Association.
The 42-year-old, who recently resigned as Shamrock Rovers manager, will occupy the role for an initial period of two years, beginning on 1 February 2012.
He will be in charge for a friendly against Norway on 29 February, followed by games with the Netherlands and Finland, before World Cup qualifying.
Two other candidates were interviewed for the job, former Ipswich Town and Queens Park Rangers boss Jim Magilton and ex-Hull City, Crystal Palace and Charlton Athletic manager Iain Dowie.
O'Neill won 33 caps for Northern Ireland during his playing career, scoring seven goals, and played club football for Newcastle United, Dundee United and Hibernian.
He entered management as assistant at Cowdenbeath before becoming manager of Scottish side Brechin City.
He became Shamrock Rovers manager in 2008 and guided the club to successive League of Ireland titles in 2010 and 2011.
He made history by becoming the first manager of a League of Ireland team to reach the group stages of the Europa League following a play-off victory over Partizan Belgrade.
O'Neill left the club following their final Europa League game against Tottneham Hotspur earlier this month.
"I am honoured to be chosen to manage my country," said O'Neill.
"I'm a proud Northern Irishman who was fortunate enough to win 33 senior caps and it was always an ambition to manage my country.
"To be entrusted with the role early in my managerial career is quite humbling but I am confident that we can make progress.
"Northern Ireland has a strong football tradition but one that needs to be refreshed with some more contemporary success.
"That is my primary objective - to restore a sense of belief and pride in what it means to represent Northern Ireland so that our players will want only to play for their country - that is how it should be.
"There is a huge amount of work to be done but with the right direction and the necessary passion good progress can be made.
"The board and the chief executive have a clear plan for the future and have given me responsibility to set about the task of renewal within the context of a long-term plan.
"At the same time, in the interests of everyone involved, most particularly our supporters, my job is to work with the players to sustain a competitive performance throughout the qualifying phase of the 2014 World Cup finals."
Northern Ireland have been drawn against Portugal, Russia, Azerbaijan, Israel and Luxembourg for the World Cup qualifiers, which begin in September.
Patrick Nelson, chief executive of the Irish FA, said O'Neill was "the stand out choice from an excellent field".
"The selection panel was very impressed with his thoughts and plans over the coming years."
Nigel Worthington,  after his side's poor Euro 2012 qualification campaign in October, told BBC Sport: "The toughest thing for any Northern Ireland manager is the lack of numbers that you've got to pick and choose from.
"The one thing I experienced is that you've got to look at the youth coming through because they are the future of Northern Ireland football."
Former Northern Ireland manager, and current manager of League Two side Barnet, Lawrie Sanchez said: "To be fair to him [O'Neill], he was probably an outside runner.
"Jim Magilton and Iain Dowie had been touted heavily for the post by the Irish press but the IFA have surprised everybody by appointing Michael to do the job.
"He's probably the one with the most recent success at Shamrock Rovers, but it's early in his career to be a national manager and it's a big ask."
Michael O'Neill has been appointed as the new manager of Northern Ireland.