Niccolo Machiavelli was born in Florence in 1469. As an adult, he worked as a diplomat in the government of Piero Soderini. In 1512, however, Soderini was overthrown and the Medici family took control of Florence. One year later, Machiavelli was accused of plotting against the Medici family and was arrested and tortured. Although he was never found guilty of any crimes, he was exiled from the city.
It was during his exile that Machiavelli wrote The Prince, a book which made him famous. (You might have heard people use the term, "Machiavellian," for example, which shows just how famous he became).
Machiavelli wrote this book for Lorenzo di Medici. Machiavelli hoped that it might help him to regain his former position in the government. It did not, but the book made Machiavelli famous because of its style and content. In essence, the book is a how-to guide, designed to instruct a prince on how to rule his kingdom. Specifically, Machiavelli tells his reader to be ruthless in the pursuit of power, that it is better to be "feared" than to be "loved." This was the complete opposite to other how-to guides for princes (of which there were many), which told rulers to be moral, pious and just. This also explains why the word, "Machiavellian," has negative connotations today.
After Machiavelli's death, this book was published and was was immediately banned by the Church, making it one of the most controversial political books of all time.