“The ends justify the means” is a phrase that is originally attributed to Ovid. But Machiavelli did hint that the ends excused the means. The ultimate message of Machiavelli, that can be applied to any time in history, is that reality is more important than illusion.
The thoughts that we have about how one must conduct themselves in public, and how one must think in private, are nothing more than intellectual exercises. They do not have any use practically. If, for example, you wanted to know how to deal with a co-worker who was causing you a deep psychological disturbance, there is no use in thinking about how he ought to behave, or how you ought to react in such circumstances.
The only true thing is the reality of the situation – a coworker behaves in ways to diminish you, degrade you, or to take advantage of you. You know this is true because you experience it. In such a situation, putting an end to the bullying, even if it came at the expense of the original perpetrator (the co-worker), should not be discounted because it is unpalatable or not ideal.
To say instead that the ends do not justify the means implies that one should conduct themselves in an upright and virtuous manner, regardless of the situation. The argument here could be that such a manner of conduct, would in the long run, give you peace of mind. And it would cause people to like you more. Perhaps this entails you to simply ignore your co-worker, to be the bigger man.
To which, Machiavelli would ensure you of your stupidity.
In the first place, you will not achieve any mental peace, because you will be filled with regret over how you did not act in a way to stop the co-worker from bullying you. And second, people will not respect you for acting honorably, but will think less of you for being a pushover.
The idealist assumes that people think in the same way they do. They think to themselves, that if they saw someone act in a pacifist way, despite being bullied, that they would have respect for that person. But most people do not think in this way. As Machiavelli insists, the world is not just. That is, people are not just.
Rather than expect justice to be handed to you, it is more practical to put an end to what is bothering you. You should study the ways of your coworker, to break down their strategies, and to find ways of countering them. The point is never to use Machiavellian strategies to manipulate innocent people who do you no harm. Such behavior is pure cowardice.
Rather, the point is to develop the ability to defend your own interests, even if the way in which you do so is not very pleasant or agreeable. If someone steps on your toes, you should not allow them the pleasure of carrying on with impunity, but find a way to cause them pain, so that they do not step on your toes again.
Do the ends always excuse the means? It depends. Think of a typical example. Someone who is confronted with the predicament of having to break into a pharmacy to get emergency medication for his sick wife. Imagine that this pharmacy is the only one that is close enough to be useful, and that there is no way of contacting the owner because you do not know where they live. Will you, in such a case, break in if the life of your wife depended on it? You should. You would be evil if you didn’t. In such a case, it is clear that the ends justified the means.
Of course, there are many cases in which the ends do not justify the means, and usually, it is because the ends are not worthwhile enough, or the means are too disturbing.