'To convert the business man into the profiteer is to strike a blow at capitalism … The business man is only tolerable so long as his gains can be held to bear some relation to what, roughly and in some sense, his activities have contributed to society."

Can we create a morally acceptable form of capitalism; and if so, what would it look like? Faced with a decade of hardship apparently caused by the greed of a few, people are asking whether bankers are no more than profiteers, and whether inequality has risen too far. Even the former US treasury secretary, Lawrence Summers, and former head of the CBI Richard Lambert, have said we need to do better on inequality.

The quote above, however, comes not from anyone today but from John Maynard Keynes, in 1923, during the postwar turmoil in the financial markets. There was hyperinflation in Germany, a collapse of the Mark, chaos on the foreign exchanges as prices had gone up and down, and violent fluctuations in employment.

Like many of those who turned to communism and fascism, Keynes had strong moral objections to capitalism – but he consistently repudiated socialism, communism, and fascism, for he believed that capitalism was essential both to create high standards of living and to guarantee personal liberty. In effect he sought a capitalist revolution.

For Keynes, the sustainability of capitalism was not only a technical question but a moral question – because if capitalism is to survive, people have to believe it is a system worth supporting. His priority was to eliminate unemployment. It was also a moral priority to design an international monetary system that would reduce the chances of capitalism descending into chaos again. And to do that, economists had to grapple with difficult technical details, but their motivation was a vision of a better capitalism.

We face the same challenge today – to develop a morally acceptable form of capitalism. As Keynes feared might happen, much business is now seen as no more than profiteering. Many people object to the bonus culture of the banking system because they don't believe those bonuses are earned. We have also learned that inequality not only undermines the legitimacy of capitalism (that was Keynes's concern) but it has corrosive effects: unequal societies are unhappier, less healthy, and have more crime.

We cannot wind the clock back, but we should not be afraid to look to the past for ideas. It is hard to make a clear distinction between profiteering and legitimate business activity and yet, throughout history, there have always been limits on what can be bought and sold in the market. Perhaps the boundaries between legal and illegal activities need to be reconsidered; perhaps derivatives need to be better regulated – or simply banned from banks' portfolios. Creating a more stable banking system so that banks do not need bailouts would help maintain high employment and tackle inequality.

We can also look abroad. A decade ago it was common to look to Scandinavia or Germany and to compare their institutions with ours. Now "Anglo-Saxon" capitalism has lost its shine, perhaps we should reconsider whether we can learn, for instance, from Germany, with its system of industrial democracy and a banking system geared up to support industry, or try to find out why the gap between rich and poor is much narrower in most of Europe.

One reason for the problems we face today is that we have stopped seeing taxes as an essential institution in a capitalist economy for if taxes could be raised, especially on those who can most afford to pay them, public services would not have to be cut. We should see taxes as an integral part of a moral capitalist economy, providing health, education and social care outside the market. People should not be afraid to join Warren Buffett in saying the rich should pay more tax. The "Tobin tax" on financial transactions should not be seen as a way to raise funds for the euro, but as a tax that could help stabilise the financial system and as a "Robin Hood" tax.

Such changes need to be analysed carefully, for technical details do matter, but they need to be on the agenda: if we are to save capitalism, as we must if we want prosperity and liberty, we must face up to its moral failings. Unless we do this, we will be unable to imagine a better future, let alone work out how to achieve it.