Treasury computers have been coming under online attack at a rate of more than once a day, George Osborne has disclosed.
The Chancellor said there were hundreds of "serious" attempts to break into his department's systems last year.
The Treasury was one of the biggest targets in Whitehall for "hostile intelligence agencies", he said in a speech to the Google Zeitgeist conference in Hertfordshire.
While extolling the virtues of the internet in opening up information and improving government accountability and policy-making, he acknowledged there were "challenges alongside opportunities". He said the recent hacking of Sony PlayStation accounts demonstrated the need for "robust online security" by the Government as well as the private sector.
More than 20,000 "malicious emails" are sent to government networks in any given month, said Mr Osborne.
"During 2010, hostile intelligence agencies made hundreds of serious and pre-planned attempts to break into the Treasury's computer system," he said. "In fact, it averaged out as more than one attempt per day. This makes the Treasury one of the most targeted departments across Whitehall."
He cited an example from last year of a legitimate G20-related email sent to the Treasury, which appeared to have been re-sent a few minutes later.
But in the second email the original attachment had been replaced by a file containing, he said, "malicious code".
"To the recipient it would have simply looked like the attachment had been sent twice," Mr Osborne went on. "Fortunately, our systems identified this attack and stopped it."
He said the Government was "not taking this challenge lying down" and that he had committed £650 million to a National Cyber Security Programme to improve online security. He added: "We are determined to get the security question right, so that we can maximise the opportunities that the internet age presents."