The New Patriotic Party (NPP) said Mr Mahama won the election fraudulently.
Official results gave Mr Mahama 50.7% of the vote, enough to avoid a run-off against the NPP’s Nana Akufo-Addo, who won 47.7%.
Ahead of his inauguration, Mr Mahama called for unity in Ghana – seen as one of Africa’s most stable democracies.
Mr Mahama was Ghana’s vice-president until the unexpected death of President John Atta Mills in July.
He has served since then as acting president.
On Friday, Mr Mahama appealed to members of parliament to work together.
“For the long-term survival of our nation, we must agree and commit to a multi-partisan process,” he said.
“Whatever our differences, whatever our politics, we must pull together and rise to meet these challenges.”
Thousands of Mr Mahama’s supporters have packed Independence Square in the capital, Accra, for the ceremony, reports the BBC’s Sammy Darko from the scene.
The stage is beautifully designed in the shape of the black star of Ghana, he adds.
Mr Mahama is due to be sworn in before 11 African heads of state. Officials from the US, China and the UK will also be there.
Ghana’s privately-owned Joy FM radio station reports that about 40 NPP supporters have besieged the home of former President John Kufuor to prevent him from attending the ceremony.
Earlier, Mr Kufuor told Joy FM that he would attend the inauguration, in defiance of the wishes of his NPP party.
“Anybody who says that I have betrayed the NPP by attending President Mahama’s inauguration is only following his emotions. Leading a nation is not easy so where I have reached, I am more of a statesman than mere party person,” he is quoted as saying.
“Leadership comes with lots of responsibility so if I am called to a function by people who made me president some time back, who am I to decline?”
The NPP filed a petition over the election result at the Supreme Court in late December, saying it had found irregularities including unregistered voters casting ballots.
“We are challenging the legitimacy of that election and the winner of which is being sworn in,” NPP spokesman Perry Okudzeto told AFP news agency.
“We don’t see why we should be part of the swearing-in of an ill-elected president.”
Mr Mahama’s National Democratic Congress (NDC) said the elections were the most transparent the country had seen.
International election observers described the 7 December poll as free and fair.
Ghana’s government says the presence of international leaders at Monday’s ceremony is an endorsement of the vote.
Mr Mahama won by just over 300,000 votes, obtaining 5,574,761 ballots compared to Mr Akufo-Addo’s 5,248,898.
The NPP is disputing about 1,340,000 votes cast for Mr Mahama – enough to swing the outcome in favour of Mr Akufo-Addo.