Henry Waxman, the committee chairman, asked Greenspan: "You had the authority to prevent irresponsible lending practices that led to the subprime mortgage crises. You were advised to do so by many others and now the whole economy is paying its price.
"Do you feel that your ideology pushed you to make decisions that you wish you had not made?"
Greenspan replied: "Yes I found a flaw. I don't know how significant or permanent it is, but I've been very distressed by that fact."
Al Jazeera's John Terrett, reporting from New York, said: "Greenspan used to be treated like a returning victorious general every time he went to Capitol Hill.
"During his 20 years as head of the US central bank, the Federal Reserve, Americans never felt better off.
"Today, it wasn't quite like that. It was a very different Alan Greenspan who was dragged back to Capitol Hill and grilled ... in came hostile questions about unfettered lending and lack of oversight.
"Gone was the usual deference for the man considered chief architect of America's 80s and 90s boom years.
Greenspan said he was shocked at the banks' inability to self-regulate and blamed over-eager investors for the sub-prime housing meltdown that led to the financial crisis, our correspondent said.
Greenspan's critics had accused him of leaving interest rates too low in the early part of the decade, spurring an unsustainable housing boom which went largely unregulated.
Admitting to the "flaw" in his free-market ideology, he said: "That is precisely the reason I was shocked, because I'd been going for 40 years or more with very considerable evidence that it was working exceptionally well."
Greenspan also said that the current crisis had "turned out to be much broader than anything that I could have imagined".
He said that the current global financial crisis was a "once-in-a-century credit tsunami" which will have a severe effect on the US economy and drive unemployment higher.
He admitted he had also been "partially" wrong in opposing the regulation of derivatives in recent years.
He was joined by John Snow, the former treasury secretary, and Christopher Cox, the securities and exchange commission (SEC) chairman.
Waxman said that he believed that the Federal Reserve, which regulates banks, the SEC and the treasury had all played a role in contributing to the mistakes.
Waxman, a Democrat, said: "The list of mistakes is long and the cost to taxpayers is staggering.
"Our regulators became enablers rather than enforcers. Their trust in the wisdom of the markets was infinite. The mantra became that government regulation is wrong. The market is infallible."
In his testimony, Greenspan blamed the problems on heavy demand for securities backed by subprime mortgages by investors who did not worry that the boom in home prices might come to a crashing halt.
"Given the financial damage to date, I cannot see how we can avoid a significant rise in layoffs and unemployment," Greenspan said.
"Fearful American households are attempting to adjust, as best they can, to a rapid contraction in credit availability, threats to retirement funds and increased job insecurity."
Greenspan said that a necessary condition for the crisis to end will be a stabilisation in home prices, but he said that was not likely to occur for "many months in the future".
When home prices finally stabilise, Greenspan said, then "the market freeze should begin to measurably thaw and frightened investors will take tentative steps towards re-engagement with risk".
Greenspan said until that occurs, the government was correct in moving forward aggressively with efforts to support the financial sector.
He called the $700bn rescue package passed by the US congress on October 10 "adequate to serve the need" and said that its effect was already being felt in the markets.