The state-run Electricity Company of Ghana (ECG) on Thursday cut power supplies to the parliament over a debt of 23m Ghanaian cedi ($1.8m; £1.4m).
The outage interrupted a debate on the president’s State of the Nation speech.
A video shared by local media showed MPs in the dimly lit chamber chanting: “Dumsor, dumsor”, which means power outage in the local Akan language.
Local media reported that a back-up power generator restored power to the chamber a few minutes later.
But other parts of the parliament building remained without power for most of the day before supplies were restored.
MPs and parliamentary staff who were using the elevator when the abrupt blackout hit were stuck, Ghana’s TV3 channel reported.
The power company’s communications director William Boateng told Reuters news agency it had resorted to disconnecting power because of parliament’s refusal to “honour demand notices to pay up”.
Electricity was restored later in the day after parliament paid 13m cedi and made a pledge to settle the remaining debt within a week, Mr Boateng added.
Parliamentary finance official Ebenezer Ahumah Djietror denied that parliament owed the amount quoted by the power company.
He said that the company’s system failed to record recent payments made by parliament and insisted that the outstanding power bill was about $950,000.
Ghana’s electricity company, which is facing crippling financial difficulties, frequently disconnects power from indebted clients.
“Disconnections are for everybody; anyone who doesn’t pay and fails to make arrangements, the team will disconnect,” Mr Boateng told Reuters.
In recent years, power shortages have worsened as the country grapples with its worst economic crisis in a decade, and these have become even more frequent in the past few months.
Private electricity suppliers are owed $1.6bn by the state power company, according to Elikplim Kwabla Apetogbor, the head of the organisation representing them.
Last July, they threatened to shut down operations over the arrears.
Opposition MPs have urged the government to invest in the power sector to prevent it from collapsing. They have attributed the current challenges to a lack of funds to purchase fuel for the country’s thermal generation plants.