Machiavelli is commonly taken to be saying that the ends always justify the means, but he does not believe that. Quite the contrary. He simply recognizes the reality that there are times when a leader must accept dreadful responsibility in serving the common good.
We all know this to be true. Consider the story of Henry Tandey, a British infantryman in the Duke of Wellington Regiment in the First World War. On September 28, 1918, Tandey participated in an attack against enemy trenches near the small French town of Marcoing. The British carried the day, and as they advanced, Tandey Cautiously peered into a trench. He saw an enemy soldier, a corporal, lying bleeding on the ground. It would have been easy for Tandey to finish off his enemy, as he had killed many that day; Tandey had played an heroic role in the battle and later was awarded the Victoria Cross, the highest wartime decoration, for his great courage. But he felt it was wrong to shoot an injured man, and he spared the corporal's life.
In 1940, during the Nazi bombardment of Coventry, when Tandey worked as a security guard at the Triumph automobile factory, he gnashed his teeth. "Had I known what that corporal was going to become! God knows how sad I am that I spared him." The corporal was Adolf Hitler. Tandey's human gesture had led to the deaths of millions of people and, in a bitter irony of military destiny, had placed his own life at the mercy of the monster whose life he could have taken.
Murder is surely evil, yet every reasonable person will agree that the cause of good would have been greatly advanced if Henry Tandey had killed Hitler in that trench. History abounds with examples of good actions furthering the cause of evil...