Humanism is evident in both works and in both senses of the word. As has already been mentioned in a previous contribution, Machiavelli cites a number of examples of classical wisdom—Livy being an obvious example—in order to add authority to his political philosophy. However, Machiavelli's incorporation of classical ideas into his political science is not in any sense abstract; he is using the example of antiquity to show that his realist view of politics is practical and has been applied successfully in the past. The political values of antiquity were universal, but they needed to be applied to a contemporary setting. This is what Machiavelli sets out to do.
This is one sense in which Machiavelli's work can be described as humanist. It is also humanist in that it systematically excludes religion from playing any positive role in the governance of the state. The state must be entirely secular: its functions, its policies, and its whole life must be dictated by worldly concerns. At best, Machiavelli is somewhat skeptical concerning religious matters, but he is precluded from expressing this openly. Although the Renaissance was the age of humanism, it was also still a deeply religious age. Outward expressions of anything vaguely agnostic were ill-advised in the extreme. That being the case, Machiavelli points to specific historical examples to illustrate his point that religious considerations should have no bearing on the workings of government.
At this time in history, the Pope was almost like a secular prince. He owned substantial tracts of territory in Italy and regularly waged war against his enemies. Although successive popes behaved like secular rulers, they owed their authority to their spiritual role as head of the Church. Machiavelli looked at the constant war, bloodshed, and political instability that ravaged Italy as the necessary consequence of papal involvement in secular affairs.
In The Prince and Discourses on Livy, Machiavelli exhibits the characteristics of humanism in many ways. First, both works are full of allusions to classical politics, especially to the Roman Republic. Livy himself was an ancient Roman historian, writing shortly after the fall of the Republic, and Machiavelli attempts to use his telling of Roman history to discuss the ways in which a republic could be sustained among modern people. The frequent allusion to classical works is also found in The Prince (a very different book than Discourses.) He refers to Alexander the Great, Julius Caesar, and many other examples from ancient Greece and Roman history to frame his argument. The argument of the Prince itself is an example of humanistic thinking. In the Prince, he famously advocates that a prince's behavior as a leader should not be governed by abstract, usually religious notions of right and wrong but rather by a hard-headed appraisal of how the world actually works, and what is most likely to achieve the best results. This view is characteristic of humanism. So in terms of content, argument, and methodology, the works of Machiavelli were steeped in humanistic principles. At the same time, Machiavelli's thinking was modern--he was no more bound by classical philosophy than he was by Christian thinking.