Machiavelli wrote when trade was moving from the Mediterranean to the north atlantic. And Italy, which had been the center of trade for at least 1500 years was flung into internecine warfare in the struggles for power. The upheavals this caused were catastrophic and remain with Italy to this day.
Machiavelli gave practical advice to leaders about how to govern by rational rather than ideological grounds. Our concept of morality today originated with the enlightenment. In Machiavelli’s time, morality was more closely connected with the church and the Prince is Machiavelli’s attempt to suggest to political leaders that practical morality in the interest of citizens is superior to ideological morality which may lead to worse consequences for citizens. In this sense, Machiavelli starts the west’s long rise toward the enlightenment.
As an administrator in the city service, he had been in charge of the city defenses, and had knowledge of the local government and war. But his work was also based on other works, most importantly Livy, and we usually recommend that people interested in the Machiavelli read the Discourses On Livy as well as The Prince in order to understand Machiavelli’s attempt to compare the past with the present and draw conclusions about what actions we must take.