The 48-year-old is set to guide Northern Ireland in the next two European Championship qualification campaigns and their quest to reach the 2022 World Cup in Qatar.
He committed his long-term future to Northern Ireland after he turned down the opportunity replace Gordon Strachan as Scotland manager last month.
“I am extremely proud to manage my country and I am pleased to be extending my time in charge of the senior team,” O’Neill said in a statement.
“In recent months I have been approached about taking other opportunities in football. However, no other challenge attracted me as much as taking Northern Ireland back to a major tournament.
“I would like to thank the Irish FA for the belief that they have shown in me by granting this contract extension and for the fans for their ongoing support of me and of the Northern Ireland senior men’s international team.”
As part of his new contract, O’Neill will also take up the role of chief football officer and will take overall responsibility for the development of the game in Northern Ireland.