One of the peculiarities of political thought at the present time is that it is fundamentally hostile to politics. Bismarck may have opined that laws are like sausages – it’s best not to inquire too closely into how they are made – but for many, the law has an austere authority that stands far above any grubby political compromise. In the view of most liberal thinkers today, basic liberties and equalities should be embedded in law, interpreted by judges and enforced as a matter of principle. A world in which little or nothing of importance is left to the contingencies of politics is the implicit ideal of the age.

The trouble is that politics can’t be swept to one side in this way. The law these liberals venerate isn’t a free-standing institution towering majestically above the chaos of human conflict. Instead – and this is where the Florentine diplomat and historian Niccolò Machiavelli (1469-1527) comes in – modern law is an artefact of state power. Probably nothing is more important for the protection of freedom than the independence of the judiciary from the executive; but this independence (which can never be complete) is possible only when the state is strong and secure. Western governments blunder around the world gibbering about human rights; but there can be no rights without the rule of law and no rule of law in a fractured or failed state, which is the usual result of westernsponsored regime change. In many cases geopolitical calculations may lie behind the decision to intervene; yet it is a fantasy about the nature of rights that is the public rationale, and there is every sign that our leaders take the fantasy for real. The grisly fiasco that has been staged in Afghanistan, Iraq and Libya – a larger and more dangerous version of which seems to be unfolding in Syria – testifies to the hold on western leaders of the delusion that law can supplant politics.

Machiavelli is commonly thought to be a realist, and up to a point it is an apt description. A victim of intrigue – after being falsely accused of conspiracy, he was arrested, tortured and exiled from Florence – he was not tempted by idealistic visions of human behaviour. He knew that fear was a more reliable guide to human action than sympathy or loyalty, and accepted that deception will always be part of politics.

That does not make Machiavelli a cynic, still less amoral. As Philip Bobbitt puts it in his book The Garments of Court and Palace (newly published by Atlantic, £22), “Machiavelli is a profoundly ethical writer.” He may have found a place in history as Old Nick – the apologist for violence and treachery who is such a disturbing presence in Shakespeare and Milton. But Machiavelli was also an enthusiast for republican government, who wanted to free Florence from the grip of the Medici dynasty and create a modern state uniting Florence with Rome and the territories ruled by the papacy.

Published posthumously in 1532, Machia - velli’s best-known book, The Prince, acquired its Luciferian reputation because in it he counselled that rulers must not be guided by conventional ideas of virtue and morality: “It is essential to understand this: that a prince – and especially a ‘new’ prince – cannot always follow those practices by which men are regarded as good, for in order to maintain the state he is often obliged to act against his promises, against charity, against humanity and against religion.” As has often been observed, the lesson of The Prince is that, in politics, the end justifies the means.

Crucially, however, the end is never only gaining and keeping power. If we read The Prince alongside Machiavelli’s other writings – particularly the Discourses, written soon afterwards and also published after he died – it becomes clear that he believed that departing from what are commonly perceived to be the dictates of morality was necessary in order to achieve high political ends. Rulers were justified in using the most ruthless methods, but only if the ends they pursued were achievable and worthwhile.

For Bobbitt, the author of The Shield of Achilles: War, Peace and the Course of History (2002) among other notable books and himself a constitutional lawyer, Machiavelli’s most celebrated work is a constitutional treatise dealing with the transition from feudalism to the princely state. What is modern in Machiavelli’s thinking is the idea of the state, which feudal society – a network of institutions and authorities with no sovereign power – lacked. The advice he gives applies in the realm of politics, where the overriding obligation of the prince is to protect and promote the common good. Modern princes do not have the luxury of governing according to their judgement of right and wrong. They are required by the authority they exercise to depart from ordinary morality. Machiavelli’s seeming disdain for virtue is actually, in this view, a thoroughly moral affirmation of the duties that go with ruling a modern state.

In the course of arguing for a view of Machiavelli as a constitutional theorist, Bobbitt provides a gripping account of his role in the tangled and dangerous politics of the time, including a detailed analysis of the complex role of the Borgias and the Medici. He discusses and rejects the common view of The Prince as a “mirror book” – the genre, going back at least as far as Cicero, in which the writer advises a prince or court official on how to behave. He presents a compelling picture of Machiavelli as someone unable to live by his own ideal of virtu: the vital energy a human being could use to achieve a partial victory over fate.

In some ways Machiavelli was at odds with the spirit of the time, which was better expressed by more sceptical writers such as his friend Francesco Guicciardini (1483-1540), a historian and aphorist who criticised him – perhaps rightly – for having an excessive belief in the power of human intelligence to fathom the complexity of events.

This is an extremely innovative interpre - tation of one of history’s most enigmatic thinkers, and one that anyone concerned with modern politics will profit from reading. Yet I cannot help thinking that Bobbitt’s reading has the effect of domesticating Machiavelli for a liberal audience, and thereby evading his true message. Like successive generations of scholars and poets who misread Homer and failed to grasp how remote from Christian values the Homeric world was, Bobbitt has projected late-modern (and particularly American) beliefs and values on to a writer who lived in a world where they were unknown.

Machiavelli’s attitude to religion is an instructive example. Keen to refute the view that the author of The Prince was a latter-day pagan, Bobbitt attempts to show that the book’s teachings can be reconciled with Christianity. Machiavelli believed that the ruler of a modern state must of necessity depart from ordinary moral norms; but, Bobbitt suggests, obedience to necessity was, in Machiavelli’s view – and that of many theologians at the time – God’s will, and so not at odds with Christian belief.

It is a somewhat contrived argument. There is no trace in Machiavelli of the idea of a providential order in history, which (whether they knew it or not) underpinned the belief of generations of liberals in continuing progress. Following pagan religion and the historians of classical antiquity, Machiavelli had no such faith. He knew that history was a mix of fate and chance, which human beings could resist and at times even partly shape, but never master. This belief in fortuna, the wheel of fortune that eventually overturns all human works, is the guiding thread in Machiavelli’s view of politics.

Bobbitt’s Machiavelli is a prescient obser - ver of changes that led to the modern system of sovereign states. As Bobbitt makes clear in the epilogue, however, he believes a transition is under way in which this system is mutating into another: a “market state” in which sovereignty will no longer exist. The model for this market state is evident – so much so, that Bobbitt thinks it could be glimpsed in the early 16th century.

“Machiavelli,” he also writes, “is the ‘spiritual forefather’ of the US constitution.” And ramming the point home, he continues: “A free and powerful republic, with a civil religion (the reverence Americans have for their constitution) . . . are elements of a Machia - vellian polity that has, thus far, been a remarkable success.”

Much like Francis Fukuyama, Bobbitt sees modern history as moving – not quite inevitably, but with a powerful momentum – towards a world order modelled on the US system of government. Unlike Fukuyama, Bobbitt has always stressed that this process can advance only through a succession of intense wars. The assault on Iraq was one such war. A stage on the way to an Americanised world, post-Saddam Iraq was intended to become a secular democracy whose example would transform the Middle East. As many in 2003 warned would happen, the invasion has had altogether different results. Heavily tilted towards Iran, with its oil resources increasingly open to Chinese control, the new state of Iraq is an arena of geopolitical manoeuvring and sectarian warfare.

Democracy is proving not to be the vehicle for constitutional freedom that Bobbitt, along with so many others, imagined it would be. Throughout the Middle East, and now in Turkey, democratic development is producing varieties of Islamist rule rather than anything resembling secular liberalism. At the same time, while American projects of regime change have proved to be self-defeating, the United States itself has suffered something close to economic collapse. The paradigmatic market state has survived only by nationalising large parts of its financial system. If the US is recovering better from the financial crisis than other countries, it is as an exceptionally cohesive 19th-century nation state and not the prototype for a new world order. A global market state is an ideological phantom, just like the end of history.

If Bobbitt misreads Machiavelli, it is because Machiavelli is as much of a heretic today as he ever was. Resistance to his thought comes now not from Christian divines but from liberal thinkers. According to the prevailing philosophy of liberal legalism, political conflict can be averted by a well-designed constitution and freedoms enshrined in a regime of rights. In reality, as Machiavelli well knew, constitutions and legal systems come and go. According to Bobbitt, “The lesson of Machiavelli’s advice to statesmen is: don’t kid yourself. What annoyed . . . Machiavelli was the willingness of his contemporaries to pretend that quite simple formulations were adequate to the task of governing in the common interest.” Plainly, the market state is a formula of precisely this kind.

The true lesson of Machiavelli is that the alternative to politics is not law but unending war. When they topple tyrants for the sake of faddish visions of rights, western governments enmesh themselves in intractable conflicts they do not understand and cannot hope to control. Yet if Machiavelli could return from the grave, he would hardly be annoyed or frustrated by such folly. Ever aware of the incurable human habit of mistaking fancy for reality, he would simply respond with a Florentine smile.

John Gray’s latest book is “The Silence of Animals” (Allen Lane, £18.99)