Marvell's first poems, which were written in Latin and Greek and published when he was still at Cambridge, lamented a visitation of the plague and celebrated the birth of a child to King Charles I and Queen Henrietta Maria. He only belatedly became sympathetic to the successive regimes during the Interregnum after Charles I's execution, which took place 30 January 1649. His "Horatian Ode", a political poem dated to early 1650, responds with lament to the regicide even as it praises Oliver Cromwell's return from Ireland.
Circa 1650–52, Marvell served as tutor to the daughter of the Lord General Thomas Fairfax, who had recently relinquished command of the Parliamentary army to Cromwell. He lived during that time at Nun Appleton Hall, near York, where he continued to write poetry. One poem, "Upon Appleton House, To My Lord Fairfax", uses a description of the estate as a way of exploring Fairfax's and Marvell's own situation in a time of war and political change. Probably the best-known poem he wrote at this time is "To His Coy Mistress".