SITTING in the Guildhall yesterday, attending the Margaret Thatcher Conference on Liberty, I was struck by two thoughts. First, Thatcher was probably the only British Prime Minister who truly understood capitalism, not just as an engine of wealth creation and efficiency, but also as a moral force for good. But secondly, while the economic battle for capitalism was largely successful in the 1980s, the moral case wasn’t really fought. Now it is in danger of being lost.

Milton Friedman argued that economic efficiency and wealth creation were not the primary benefits of capitalism. He believed that the intellectual defence of the free market should focus on its moral superiority. But that message is crowded out and ridiculed today. The word capitalism itself is seen as emotive and pejorative, conjuring up all manner of negative images – whether Gordon Gekko screaming “greed is good”, or bank chief executives giving unrepentant interviews in the wake of the financial crisis.

Some of capitalism’s proponents haven’t helped either, by buying into the greed myth. Ayn Rand has sold 30m books, among them a collection of essays entitled The Virtue of Selfishness. Rand argued that capitalism and altruism are incompatible – a social Darwinian survival of the fittest.

So to Joe Public, the essence of capitalism is greed. But there’s a problem with this story. It’s a lie.

The patron saint of capitalism, Adam Smith, wrote about self-interest not selfishness. Indeed, he was at pains to distance himself from the work of Bernard Mandeville who, early in the eighteenth century, articulated the view that individual greed was good for society.

The essence of capitalism is not greed, but service – serving customers and markets through a process of voluntary exchange. If the players have too much market power, the process becomes less effective. But voluntary exchange, free entry and exit, competition, innovation, property rights and the rule of law are the essence of capitalism.

The problem isn’t with the system, it’s with the people. When individuals don’t have the right values and a sense of responsibility, excess ensues. As Irving Kristol has argued, to the extent that western capitalism has abandoned its Judeo-Christian values, the system has become “uglier”.

Sorry to be blunt, but the best analogy is with sex. Play within the rules and responsibly and it’s great. Play away from home irresponsibly and there’ll be problems. Sex is not the issue, just as capitalism is not the issue. The issue is with responsibility and values. And just to drive the point home, you can drive a car responsibly or irresponsibly. But if you crash it, don’t blame the car.

Capitalism is the greatest system in history for wealth creation. Nothing comes close to it. The freedom and human flourishing it has provided is mesmerising – just look at the progress of humanity over the past two centuries. But capitalism is built on institutions, and those institutions are largely built on values such as honesty, freedom, responsibility and vitality. The attack on capitalism at present is both at the level of values and institutions. The pillars are crumbling.

Further, it’s not at all clear what else is on offer other than more statist solutions to state-created problems. There may be utopian dreams, but they’re a nonsense. As Martin Wolf has written: “Those who condemn the immorality of liberal capitalism do so in comparison to a society of saints that has never existed and never will”.

Our consumerist, materialist society does appear excessive, but remember that it emerges from the free expression of tastes and preferences you and I have chosen. If we don’t like it, we’re free to choose something else. That’s the whole point. We, personally, need to get a grip if we’re running around with unlimited wants that can never be fully satisfied.

For the producers and wealth creators, how do we get back to a spirit of vitality, innovation, wealth creation and human flourishing, so that free markets and free people can truly maximise their potential? It rests on values and institutions.

In my view, part of the institutional answer is to acquire a much “thicker” concept of economic liberty. Economic liberty needs to be seen as just as important as other natural rights – the maximum property rights (less taxation) consistent with a small but sensibly sized state. There’s an even stronger positive moral and economic message as well. Virtue requires freedom. More freedom requires less government. So less government can produce more wealth and virtue, building economic and social capital.

But make sure you take this away. Capitalism does not need greed, and it will only feed greed if you let it.

Graeme Leach is director of economics and prosperity studies at the Legatum Institute in London.