The Prince was a book of its time both politically and intellectually . But it was also a personal book, and we miss something of its power if we ignore its biographical context.
Machiavelli's family was neither wealthy nor well-connected. His father, Bernardo, was a lawyer and humanist who diligently grounded his son in the
studia humanitatis but was unable to arrange for him a life of aristocratic luxury or even a cushy government stipend.
Instead, although Machiavelli's early years are poorly documented, it seems certain that it was a combination of humanist education, hard work and intelligence that earned him a major appointment in 1498. Machiavelli was as close to being a self-made man any anyone in Renaissance Florence.
As secretary of the Ten of War, Florence's foreign affairs and war committee, he was the city's highest-ranking diplomat for 14 years, leading embassies to and spending months in the courts of the French king, the pope, the holy Roman emperor, and others. The Prince was written by a man who, as he informs Lorenzo de'Midici in the dedication, had "knowledge [that was] gained through long experience of contemporary affairs". When it came to geopolitics, Machiavelli knew whereof he spoke.
The author's diplomatic career saturates The Prince. Alongside the Greek and Roman models so favoured by humanists, the book is populated with contemporary examples and lessons, many of them transposed, almost verbatim, from Machiavelli's personal correspondence and legations. Thus his breathless praise for Cesare Borgia's ruthlessness, his admiration of Pope Julius II's boldness, and his criticism of the Emperor Maximillian's ineptitude passed largely unaltered from diplomatic communiques into The Prince.
Even when his diplomatic memos are not quite so obvious, Machiavelli's experience remains in view. His time at the French court taught him that the Florentine view of their city's power and importance was utterly naive and inflated. If the republic wished to survive it needed to recognise how the real world worked. The Prince offered some candid and blunt advice along these lines, explicitly drawn from a career at the ambassadorial coalface. The author was, in effect, leaking the diplomatic cables in order to help "save [Italy] from the cruelty and barbarity of [the] foreigners" encroaching upon it.
edit: Not my work
http://www.guardian.co.uk/commentisfree/2012/apr/09/machiavelli-personal-political-prince