Marvell was born in Winestead-in-Holderness, East Riding of Yorkshire, near the city of Kingston upon Hull, the son of a Church of England clergyman also named Andrew Marvell. The family moved to Hull when his father was appointed Lecturer at Holy Trinity Church there, and Marvell was educated at Hull Grammar School. A secondary school in the city, the Andrew Marvell Business and Enterprise College, is now named after him.
At the age of 13, Marvell attended Trinity College, Cambridge and eventually received a BA degree. A portrait of Marvell attributed to Godfrey Kneller hangs in Trinity College's collection.
Afterwards, from the middle of 1642 onwards, Marvell probably travelled in continental Europe. He may well have served as a tutor for an aristocrat on the Grand Tour, but the facts are not clear on this point. While England was embroiled in the civil war, Marvell seems to have remained on the continent until 1647. It is not known exactly where his travels took him, except that he was in Rome in 1645 and Milton later reported that Marvell had mastered four languages, including French, Italian and Spanish.