The Foreign Office sought to identify countries that could pose "similar risks" as Afghanistan, a senior former diplomat told the Iraq Inquiry.
Stephen Pattison said the phrase was dropped after it emerged it had been taken from a magazine article.
Mr Pattison told the inquiry the process led to Iraq moving up the political agenda after 9/11.
Mr Pattison, who oversaw the Foreign Office's dealings with the United Nations in the run-up to the 2003 invasion said: "After 9/11, there was obviously considerable concern about areas of the world which might pose a threat.
"There was a phrase that was current at that time which was 'draining the swamp'.
"It was the title of a paper put up by our planning department about how we could address areas of the world which post 9/11 might fit into the same pattern - areas like Afghanistan - which frankly we had not paid enough attention to before 9/11 and which had resulted in an attack on the US.
"The 'draining the swamp' line was a bit about: 'let's look around and see where there might be other places that could pose similar risks'."
Although the phrase "encapsulated" the post 9/11 security approach, he said it was soon dropped "partly because I think it actually came from a published magazine article".
Panel member Sir Roderic Lyne, a former Ambassador to Russia, asked him whether the phrase "didn't originally come from Chairman Mao".
He replied: "I think it originally did but then I think it was taken up by the Economist in the context of the post 9/11 stance. The thought behind it, I think, was the thought which drove the then British government into focusing very hard on Iraq."
The phrase "draining the swamp" is commonly attributed to Chairman Mao - but Dr Yiyi Lu, a Chinese expert at Chatham House, said she did not immediately recognise the phrase and that its meaning seemed "too vague".
Asked about the decision to go to war, Mr Pattison said the UK was driven by rather "idealistic" motives rather than direct concerns about its own security or a decision to alter the balance of power in the region.
"I think Tony Blair's view was always that - the idealists' view that we were doing this to make the world a safer place. We were not doing this because there was a direct threat to the UK; we were doing this because it was in the interests of the international community and because it was in the interests of the international community he expected the international community to step up to the plate and do it."
The Iraq Inquiry is concluding its latest round of hearings - expected to be the last before it starts the process of compiling its report.
Former foreign secretary Jack Straw will give evidence for the third time on Wednesday.
The UK drew up a list of countries seen as potential threats after 9/11 in a process known as "draining the swamp".