In 1949 a famous free-market economist made a significant decision. He knew that in Arkansas the state laws made divorce easy – and cheap. He was married to a woman whom he acknowledged had been "a very good wife" for more than 20 years, and with whom he'd had two children. But his real love, previously married herself, had told him that she was now free to remarry. So the economist got a job at the University of Arkansas and, once resident, also got a divorce, quickly and efficiently, all at a very reasonable price.

The episode shows a certain consistency in Friedrich Hayek's actions at this juncture of his long career. Many former friends, however, took the view that his behaviour was deplorable. As moral conservatives, they were shocked, though perhaps they should have remembered Hayek's frequent protestations that he was not himself a conservative but an old-fashioned liberal. Such cross-cutting standards of judgment are still on display today, not least in the United States. Glenn Beck has rediscovered Hayek as a hero, but the great prophetess of libertarianism, Ayn Rand, privately scourged him as a "total, complete, vicious bastard".

Such opinions cannot all be right. Here is one reason to welcome the close attention that Hayek receives in about half of Nicholas Wapshott's book. It harnesses the author's skills as a journalist in a lucid and accessible introduction to Hayek's work. There is one curious omission: no mention of Hayek's central emphasis on prices in providing information as well as incentives (hence the ready availabilty of divorce in Arkansas is signalled by its low price).

Wapshott's focus is not so much on economic theory as on its relevance to economic policy-making. Hence the inevitable pairing, in the other half of his book, of Hayek with John Maynard Keynes, on the grounds that this was "the clash that defined modern economics". Again, the author has done his homework in getting on top of the vast literature about Keynes – some of it of recent vintage. For these are not dead and dusty debates among professional economists but ongoing skirmishes in an ideological struggle that started in the 1920s – an 80 years' war with no final victory yet in sight.

Keynes and Hayek exemplified two different approaches. Keynes came from the heart of a Cambridge tradition (later continued in that other Cambridge in Massachusetts) that saw economics as a humane discipline or moral science, providing tools for earnest attempts to do good in the world. Hayek, by contrast, with his background in the Austrian school, was absorbed in a quest to understand the abstract beauties of the price mechanism, with some impatience for restless advocates of quick-fix solutions.

Little wonder that there was a clash, in temperament as much as doctrine, between the two. Wapshott brings out their mutual attraction in personal relations and intellectual interests, while structuring his book around a prolonged duel between the two men, each with supporters ready to act as seconds in a more combative spirit than the principals. The most damning thing that Keynes said about Hayek's work was that it was "an extraordinary example of how, starting with a mistake, a remorseless logician can end up in Bedlam". His logic was thus an irrelevant abstraction, its beauty purely formal. The most damning thing that Hayek later found to say about Keynes's general theory was that it was "a tract for the times".

Interestingly, as Wapshott notes, Hayek applied the same phrase, in the same pejorative tone, to his own most famous publication. His popular book The Road to Serfdom, published in 1944, suddenly gave the austere Austrian a degree of name-recognition in the same league as Keynes, not least in the US. With the New Deal and subsequent wartime prosperity as object lessons, liberals on both sides of the Atlantic adopted the Keynesian mantra that full employment could only be guaranteed by government. Conservatives seized on Hayek's tract as a timely warning of the perils down the road. But whereas Keynes surfed his wave of fame, Hayek quickly became alarmed at having inadvertently written a bestseller – "a very corrupting experience", he decided.

Hayek was not always the fastidious scholar. As Wapshott notes, he was guilty of "misappropriating" the aphorism with which Keynes had reproached the sterility of orthodox inertia in policy-making – "in the long run we are all dead". Hayek refused to come up with any policy option, preferring to trust the market, however long it took to show its self-correcting tendency. He refused, too, to take seriously the general theory's insistence that the outcome for the economy as a whole, in aggregate, may defy analysis purely in terms of the behaviour of individuals. Yet everyone recognises this dimension as macro-economic today, even those who are strongly opposed to Keynesian policies for stimulating and regulating effective demand.

This poses a problem for an account of the eighty years war that polarises it between Keynesians and Hayekians. For in policy terms, it was surely Milton Friedman who, in the 1960s and 70s, seized the moment to proclaim a counter-revolution against Keynesianism. It is a point that Wapshott well recognises. Friedman, an ardent new dealer in his youth, was an economist who fought with same macro-economic weapons as the Keynesians, but sought to substitute manipulation of monetary policy, through interest rates, for that of fiscal policy, through taxing and spending. Hence Friedman's acknowledgement in 1966 that "in one sense, we are all Keynesians now".

This statement reads like that of a Protestant heretic who defies the Pope, only to insist on his own variant reading of Christian doctrine. Hayek, by contrast, was not a heretic but a preacher of a different religion altogether. He is rightly matched against Keynes in upholding a pure free-market doctrine, in which economic salvation comes through faith not works – and especially not public works.

• Peter Clarke's Mr Churchill's Profession will be published by Bloomsbury later this year.