The former foreign secretary Jack Straw is not a man given to many flights of fancy. But his recent speculation that he might be persuaded to duel with the Today programme's John Humphrys is an engaging notion. James Naughtie might be a suitable "second" for Humphrys – waiting in attendance and assisting as such figures did in the duels that only really started to die out in the early 19th century. And Ed Miliband's lugubrious demeanour surely makes him an ideal seconder for Straw.

Lord Castlereagh, a predecessor of Straw's in the foreign office, fought a celebrated duel, and the episode is described in some detail in John Bew's compelling new biography of the Irishman who dominated early 19th-century diplomacy. Honour was fundamental to duelling – and had been ever since the idea of settling a dispute by armed combat emerged during the European middle ages.

In 1809, while serving as minister of war, Castlereagh discovered that his rival George Canning, the foreign secretary, was intriguing to get him sacked. The time was past when a formal affront – a strike at the cheek with a glove for example – was deemed necessary in order to announce one's challenge. A statement declaring that one sought redress since honour had been affronted was all that was needed, and Canning obliged by agreeing to the duel which went ahead on 21 September on Putney Heath.

Canning was not much of a countryman and lacked Castlereagh's expertise in field sports. When he fired his pistol the shot went far off the mark. Had Castlereagh wanted to, he could surely have killed Cannning outright. He was the kind of man who gets described in John Buchan novels as "one of the finest shots in England". Canning, though, got away lightly and was merely wounded in the thigh.

The episode highlights the difference between two styles of belief: Castlereagh, the arch-realist who did not suffer illusions, compared to Canning, who backed liberal nationalism in Greece's war of independence and the Latin American rebellions against Spanish rule. Castlereagh's realpolitik harked back to an ancien regime system of checks and balances – where ideology was discounted and men were judged by their actions rather than by their beliefs.

And in the 19th century that doctrine would once again predominate when Bismarck – another very fine shot – and Cavour negotiated their way through the tempests aroused by nationalism in Germany and Italy. Its opponents would caricature the balance-of-power as a mere game played by cynics. But the realism of those who knew that a professed ideology is an imperfect guide to human passions was a good deal better than the starry eyed idealism of a Canning.

That September day saw one of the last duels to be fought on English soil. And the horrified reaction to it says a lot about how the country was changing. The ancestor to the duel is the early medieval system of trial by ordeal – physical tests of endurance which determined guilt and innocence. Even in the central middle ages – when duels were becoming rituals involving swordsmanship – the idea that a game of physical chance could reveal a truth about mind and character was being widely rejected as barbaric and primitive.

Castlereagh and Canning had to resign from the cabinet as a result of the duel, and the idea of what constituted a gentleman was becoming more urban and urbane – a question of civil society rather than of rituals derived from the hunt, the pack and the shoot. And yet, for all its savagery, the duel did reflect a belief in a genuine code of honour.

Were Jack Straw to stick to his guns and revive the duel, this bloody etiquette could yet again catch on. Perhaps Liam Fox – an expert after all in defence matters – could be persuaded to issue a challenge to those who tormented him into resignation last week?