Marvell was an ardent Republican. He wrote several poems in honour of Cromwell, including An Horatian Ode upon Cromwell’s Return from Ireland (1650) and an elegy on his death. In 1653 he became tutor to William Dutton, Cromwell’s ward. In the same year he was recommended by Milton to be his assistant in the Latin Secretaryship to the Council of State, but was not appointed until four years later. He defended Milton after the Restoration and contributed a poem in praise of him to the second edition of Paradise Lost.
Although he is now most famous for his poetry, very few of his poems were published during his lifetime. He was MP for Hull from 1659 until his death and was renowned for his political pamphlets and satires. His most famous pamphlet, The Rehearsal Transposed, was an attack on Samuel Parker, Archdeacon of Canterbury; it was so controversial that his life was threatened, and when he died suddenly in August 1678 there were rumours that he had been poisoned – these proved to be groundless.