He was educated at the classical school of Frederiksborg and the University of Copenhagen, at least partially on the cost of Marie Kofoed.
Some years later, from 1856 to 1863, Madvig was president of the Danish parliament and leader of the National Liberal Party.
With these brief interruptions the greater part of his life was devoted to the study and teaching of Latin and the improvement of the classical schools, of which he was chief inspector.
He devoted much attention to Cicero, and revolutionized the study of his philosophical writings by an edition of De Finibus (1839).
In the book, Madvig takes a strongly conservative standpoint and attacks Theodor Mommsen's views on Caesar's programme of reforms.