Villari was born in Naples and took part in the risings of 1848 there against the
Bourbons and subsequently fled to Florence. There he devoted himself to teaching and historical research in the public libraries with the object of collecting new materials on
Girolamo Savonarola. He published the fruits of his research in the
Archivio Storico Italiano in 1856, and in 1859 he published the first volume of his ''Storia di Girolamo Savonarola e de' suoi tempi'', in consequence of which he was appointed professor of history at
Pisa. A second volume appeared in 1861, and the work, which soon came to be recognized as an Italian classic, was translated into various foreign languages. It was followed by a work of even greater critical value,
Niccolò Machiavelli e i suoi tempi (1877–82). In the meanwhile Villari had left Pisa and was transferred to the chair of philosophy of history at the Institute of Studii Superiori in Florence, and he was also appointed a member of the council of education (1862). He served as a juror at the
international exhibition of that year in London, and contributed an important monograph on education in England and Scotland. ==Enters politics==