Cowley was born in London, the posthumous son of a bookseller. He was educated at Westminster School and Trinity College, Cambridge. In 1640 he was named Fellow at Trinity but was ejected in 1644 because he was a royalist who had even written a play performed for the King's entertainment two years earlier. He went to live at Oxford, a stronghold of the royalists, before fleeing the Civil War to join the group of exiles in Paris, France. He served as secretary to Lord Jermyn, the Queen's chamberlain. He also undertook various diplomatic missions at the bidding of the Queen, Maria Henrietta, whom he officially served as cipher secretary. He returned to London in 1654, possibly on a mission, and was arrested and briefly imprisoned. Having written his first poem, Pyramus and Thisbe (1628) when he was just ten, his Poetical Blossoms (1633) made him become known as a precocious talent. An established and popular poet, he produced his collected Poems in 1656, the same year he decided to study medicine at Oxford. Though he received his medical doctorate in 1657, he never practised. The 1660 Restoration of Charles II brought him great joy and he celebrated the event in one of his best-known odes, Upon the Blessed Restoration and Return of His Sacred Majesty Charles the Second. Though he was given back his Fellowship at Cambridge in 1661, he did not receive the royal favours he might have expected. He retired to Chertsey, Surrey, from where he gave continued support to the Royal Society of Science he had helped founded.
So great was his esteem that when he died he was laid to rest next to Chaucer and Spenser at Westminster Abbey.