This famous book started out as one of the worst job applications in history. Wikimedia Commons The term "Machiavellian" isn't a compliment. That's largely thanks to Niccolò Machiavelli's famous 16th century political treatise "The Prince."

The work looks at statecraft through a realpolitik lens, often appearing to argue that the end usually justifies the means when it comes to maintaining power.

"The Prince" was was circulated as early as 1513 but only published in 1532, five years after the author's death. It effectively established Machiavelli as the father of political science and made his name synonymous with scheming and intrigue.

However, in his own career, Machiavelli was somewhat less adept at securing power.

Machiavelli started off working as a government bureaucrat in Florence. However, the recently re-established republic was in jeopardy. The city's previous rulers, the powerful Medici family, were waiting for the chance to restore their power.

With some help from Spain, the Medici defeated Florence in battle and dissolved the government.

Things quickly went downhill from there for Machiavelli.

In 1513, he was accused of conspiring against the new rulers. The former government secretary was tossed in jail and brutally tortured; he refused to admit plotting against the Medici. He was only freed when a general amnesty was declared in celebration of Cardinal Giovanni de'Medici being elected Pope Leo X.

However, Machiavelli didn't have much cause for celebrating upon his release. He was still unemployed. The former bureaucrat ended up striving to work for the very family that brought about his downfall. He jotted down "The Prince," in an attempt to impress the Medici with his grasp of the political climate. The book was eventually dedicated to Lorenzo de' Medici, who ruled Florence from 1513 to 1519.

"It was something of a job application," Machiavelli: A Biography" author Miles J. Unger told Business Insider. "I think I said in my book at one point that it was one of the worst job applications of all time. It was totally unsuccessful in its purpose and probably always doomed to failure."

So, what exactly went wrong for Machiavelli?

Lorenzo di Piero de' Medici. Wikimedia Commons

"Unfortunately for him, he wasn't a very tactful person... He basically says, 'I'm not going to tell you the things you want to hear, but the things you really need to hear if you want to hold onto power,'" Unger says. "What makes his book so revolutionary is that he's really one of the first people to write bout the world the way it actually is, not the way it ought to be. He's very clear about this. And of course, if you're Lorenzo de' Medici and you think of yourself as this great lord, you don't really want some bureaucrat telling you all the gritty, nasty details of how to hold onto power."

Along with the rest of his family, Lorenzo de' Medici ignored "The Prince." Machiavelli remained out of a job for most the rest of his life.

"It's as if someone like John Podesta sent off an email to Trump saying, 'Look, I may have been on the other side, but I have a lot of experience, I know how things work in Washington, why don't you hire me and I'll tell you how to run things?'" Unger says. "You could imagine how that would go over."

Despite his somewhat sinister modern day reputation, he notes that Machiavelli's work was remarkably honest for its time. He did not sugarcoat the increasingly violent and fraught political situation in Italy, which often served as a battleground for regional powers like France and Spain.

"Machiavelli saw an enormous amount of suffering," Unger says. "He says that if we're going to 'dwell in dreams,' nothing is ever going to happen."

After failing to impress the Medici with "The Prince," Machiavelli lived nearly another decade and a half, eventually dying in 1527. During his later years, he wrote several more works and ran a few odd diplomatic errands for the Medici.

"He considered it a life of failure," Unger says. "But of course, in the end, it's his writings for which he's famous, not the work he did as a bureaucrat for the Florentine government."