It was also revealed that Chancellor Alistair Darling had agreed to underwrite any losses which the Bank may have made on the loans.
The Liberal Democrats have called on Mr Darling to explain to the House of Commons why the Treasury guarantees were kept secret.
Vince Cable, the party's Treasury spokesman, called it a "shocking cover-up".
Shadow Chancellor George Osborne said the revelations about the secret loans showed the need to reform the system of banking regulation.
"The scale of these loans raises the question of how Labour's tripartite regulatory structure allowed these banks to come so close to collapse in the first place, and underlines the need for fundamental reform to put the Bank of England back in charge," he said.
It is the first time that the central bank has detailed this support for the two institutions.
By Hugh Pym, chief economics correspondent
We may feel numbed these days when there is talk of the hundreds of billions of pounds in taxpayer support to the banks.
Even so, the revelation of these secret emergency loans to RBS and HBOS a year ago is breath-taking.
The Bank of England only felt it was safe to reveal this covert support now, once the ink was dry on longer-term bailout deals agreed with the banks a couple of weeks ago.
Lloyds shareholders were being asked to approve the takeover of HBOS. Yet they were not told about a Northern Rock-style cash bailout of HBOS.
The authorities argue that disclosing the loans would have caused greater disturbance to the whole system. But bank shareholders might well see it differently.
Mervyn King said the Bank was acting in its capacity as the lender of last resort.
The loans, which were given in October and November of 2008, were in addition to other financial support measures extended to the banks by the government.
The chairman of the Treasury Committee, John McFall, said that when he saw the amount there had been "a little bit of an intake of breath thinking how many universities, how many colleges, how many jobs you could support with this".
The Bank of England said it had carefully considered the public interest case for disclosure but decided that the assistance should only be revealed "once the Bank considers that the need for secrecy has ceased".
RBS has since signed up for the government's Asset Protection Scheme while Lloyds Banking Group - which took over HBOS - has announced plans to raise capital from its shareholders.
The BBC's chief economics correspondent Hugh Pym said that the £62bn of emergency loans were agreed just as shareholders were being asked to approve the takeover of HBOS. He suggested that shareholders might be unhappy at not being told earlier.
Vince Cable: "Parliament and the public need to know what happened"
In his parliamentary testimony Mr King also discussed the wider UK economy, reiterating his view that the recovery was still in the early stages.
He told the Treasury Committee that the economy still faced "profound challenges".
Regarding the Bank's policy of quantitative easing - pumping money into the economy to try to boost lending by the commercial banks - Adam Posen, one of Mr King's colleagues on the Bank's Monetary Policy Committee (MPC), said he hoped the initiative was "coming to an end".
Earlier this month, the MPC voted to increase its quantitative easing programme by a further £25bn to £200bn.
However, minutes released subsequently showed a three-way split on the decision, with seven of the nine MPC members voting for it, one wanting a larger increase in the scheme, and one calling for no additional spending.
Mr King also told MPs that he did not think there was any "immediate risk" of the UK having a credit downgrade.
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.