The earliest recorded instances of this phrase seem to indicate that it originated in the British armed forces.
It is first recorded in Master Mariner (London, 1936), the reminiscences of Claude Lionel Cumberlege (1877-1962), officer in the Royal Navy:
Not counting all the preparations and the getting up from below of a new sail, I don’t suppose we were much more than half an hour at the job, thanks to a great extent to the cheerfulness and activity of Mani, our pet murderer, who was here, there and everywhere, working like a trojan [sic] and dancing about like a blue-arsed fly in a strange roundhouse.
The second-earliest recorded instance is from The Golden Carpet (New York, 1943), the story of the British military campaign of 1941 to capture Baghdad, by Somerset Struben de Chair (1911-95), English author and politician:
Joe joined the Major-General at his breakfast off a polished mahogany table in the dining-room.
In the center of all this luxury, like a fly preserved in amber, was Peter Herbert. The amber was still viscous and he sometimes emerged to buzz about, as someone described him, “like a blue-arsed fly in a tripe shop.”
On 22nd April 1970, The Times (London), quoting United Press International, reported that Prince Philip (born 1921), Duke of Edinburgh, who served in the Royal Navy, had used the phrase when Queen Elizabeth II was visiting Green Island, 17 miles out to sea from Cairns, during a tour of Australia:
Green Island, April 21.—The Duke of Edinburgh apparently annoyed by a large group of reporters and tourists, asked a photographer if he was getting enough pictures. “I hope so, sir”, the photographer replied.
“You should do”, the Duke said. “You have been running around like a blue-arsed fly.”—U.P.I.
This advertisement was published in The Guardian (London and Manchester) on 22nd January 2000:
blue arsed fly
Busy Marketing Agency
needs Account Executive
buzz Otto at
Marlow 01628 475444