"I did not expect to see instances where there are clear cases which maybe have to be answered for fraud.
"And what we've seen means that only the openness which came from the Freedom of Information Act, only that openness, is the means by which you can find out what's happening and then you've got to have proper discipline. I'm appalled. I'm shocked by what happened."
He said the clean-up would have to include all public institutions "including, I suspect, the BBC".
Asked if some MPs should be investigated for fraud, he said it was a matter for the police but added: "I would not shrink from that."
The new code of conduct would be written into the Constitutional Renewal Bill, due to be brought before Parliament later this year.
It is thought likely to include minimum service commitments to constituents, with those who break it facing possible fine or even ejection from their seats.
Mr Brown did not rule out "recall" elections for MPs who misbehave and said he was also setting up a committee to look at wider constitutional reforms, such as a bill of rights, a written constitution and House of Lords reform.
He did not rule out electoral reform but said it was important to retain the link between MPs and their constituencies.
He also said he would reject any moves from within his cabinet to encourage him to stand down as prime minister if, as expected, Labour takes a hammering at Thursday's local and European elections.
Asked whether he would stand aside if cabinet members said it would help Labour's chances at a general election, Mr Brown replied: "No, because I am dealing with the issues at hand. I am dealing with the economy every day."
According to an ICM opinion poll in the Sunday Telegraph, Labour has dropped to third place for the first time since 1987 on just 22% - three points adrift of the Lib Dems and 18 points behind the Conservatives.
David Cameron has, meanwhile, called for MPs who had claimed for non-existent mortgages to face "the full force of the law".
Speaking on Sky News, the Conservative leader said he was also "prepared to look" at giving voters the power to force their MP to face a by-election.
"I think it has to have a proper trigger so that you've got to have a situation where an MP has been censured by the House of Commons before the recall starts... I think you've got to have a parliamentary system that works," he added.
Meanwhile, Lib Dem leader Nick Clegg is calling for Chancellor Alistair Darling to be sacked over his expenses claims.
Mr Darling was accused by the Daily Telegraph of "flipping" the location of his second home four times in four years, allowing him to claim thousands of pounds.
The Chancellor is also said to have claimed public money for paying accountants to complete his tax return.
Mr Darling insisted the claims were allowable under House of Commons rules, but Mr Clegg said that as Chancellor, Mr Darling had to be beyond reproach.
He told BBC Radio 4: "As Chancellor, Alistair Darling occupies a very special position in government.
"He needs to enjoy the public's trust when it comes to issues of financial probity, of money, of managing our nation's finances."
He added it was impossible for Mr Darling to continue in that role when major question marks were being raised about his financial affairs.
Mr Clegg refused to back down or apologise when challenged about his call for Mr Darling to be sacked, telling the BBC News channel people "at the top of government had to take responsibility for what has gone wrong".
He also urged the chancellor to refer his expenses claims for scrutiny by "someone independent".
The Chancellor said the designation of his second home changed in accordance with the rules when his circumstances changed, and denied it was for personal gain.
In a statement from his office, he insisted he paid for any personal tax advice himself.
The accountancy fees claimed - allowable within the rules - were for preparing his office accounts to ensure the tax paid was correct, he added.
Mr Darling also paid tax on the benefit of living in Downing Street and the council tax there, the statement said.
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.