"Between the idea, and the reality … falls the shadow," wrote TS Eliot in The Hollow Men. The Prince lives in this shadow.

The book is firmly rooted within the "mirror for princes" genre, popularised by Renaissance humanists. Occupied by many examples from the classical world, these books claimed to help a ruler to govern well and did so with one clear message: virtue triumphs. Virtuous rulers – generous, compassionate, merciful rulers – won.

Machiavelli knew otherwise. He had spent a lifetime observing the business of ruling – first within Florence and then across Europe – and he knew only too well that the link between virtue and success was tenuous at best. The Prince sets out to expose this hypocrisy: "Many writers have dreamed up republics and kingdoms that bear no resemblance to experience and never existed in reality," Machiavelli writes witheringly. He would be different.

Machiavelli's subversion of the humanist paean to virtues is clearest, and wittiest, when he tackles openly questions of generosity, compassion and honour.

He repeatedly begins with a self-consciously feeble statement. "It would be nice to be seen as generous," he writes at the beginning of chapter 16, the "nice" hanging in the air, limp and ineffectual.

He goes on to demonstrate that generosity is, at best, a questionable virtue.

Although essential "for the man seeking power", it is dangerous for the ruler "already in power". The unpalatable fact is that generosity breeds expectations. Even more seriously, it costs money, which drains resources and causes resentment. The paradox is that to be truly generous, a ruler had, therefore, to be mean. History bore this out. "In our own times the only leaders we've seen doing great things were all reckoned mean."

There is a similar paradox when it comes to cruelty and compassion, detailed in the following chapter. Again, there is the same self-consciously weak opening: "I'm sure every leader would wish to be seen as compassionate rather than cruel." But compassion, like generosity, creates more problems than it solves. "Excessive compassion leads to public disorder, muggings and murder," writes Machiavelli, sounding like a letter to the Daily Mail. On balance, therefore, one has to be cruel to be kind – or, as Machiavelli puts it in one his most quoted aphorisms, "it's much safer to be feared than loved".

It is the same story when it comes to honour and honesty. Once again, the chapter opens in perfect pitch: "Everyone will appreciate how admirable it is for a ruler to keep his word and be honest rather than deceitful." And once again the author shows how irrelevant this is in the real world. Honour is fine, up to a point, but "a sensible leader cannot and must not keep his word if by doing so he puts himself at risk."

Time and again, Machiavelli punches through the lazy pieties of the genre in which he wrote or, more precisely, allows the real world to punch through them. It wasn't simply a matter of personal opinion that true generosity demanded meanness, cruelty compassion, and honour deceit. Innumerable examples proved it. "In our own times we've had examples of leaders who've done great things without worrying too much about keeping their word."

Forget the idea. This was how reality worked.

As if this weren't enough to scandalise contemporaries, Machiavelli's coup de grace swiftly follows. Our genuflection before the altar of political virtue may be unthinking but it isn't futile. On the contrary, virtue is very useful if you can fake it well enough. "A leader doesn't have to possess all the virtuous qualities I've mentioned, but it's absolutely imperative that he seems to possess them."

The crowd is won over "by appearances", and as "the world is all crowd", appearances matter. "It's seeming to be virtuous that helps, as, for example, seeming to be compassionate, loyal, humane, honest, and religious."

Just occasionally a note of resignation or even regret slips into Machiavelli's advice on these matters. "A ruler who wants to stay in power is often forced not to be good," he writes almost wistfully at one point.

It's not a matter of choosing cruelty or deceit, so much as circumstances choosing them for you. But that is simply the way of the world and there is little point in mourning the fact or pretending it were otherwise.

• Follow Comment is free on Twitter @commentisfree