He was the son of Sir Thomas Stanley of Cumberlow, Hertfordshire and his wife, Mary Hammond. Mary was the cousin of Richard Lovelace, and Stanley was educated in company with the son of Edward Fairfax, the translator of Tasso. He proceeded to Cambridge in 1637, in his thirteenth year, as a gentleman commoner of Pembroke Hall. In 1641 he took his M.A. degree, but seems by that time to have proceeded to Oxford. He subsequently embarked on a legal career.
He was wealthy, married early, and travelled much on the Continent. His first wife was Dorothy, daughter and coheir of Sir James Emyon, of Flower, Northamptonshire. He was the friend and companion, and at need the helper, of many poets, and was himself both a writer and a translator of verse. His portrait was painted by Sir Peter Lely and by Sir Godfrey Kneller; in all he was painted at least fifteen times. After Dorothy's death, he remarried to Catherine Killigrew.
Stanley's most serious work was his History of Philosophy, which appeared in three successive volumes between 1655 and 1661. A fourth volume (1662), bearing the title of History of Chaldaick Philosophy, was translated into Latin by J. Le Clerc (Amsterdam, 1690). The three earlier volumes were published in an enlarged Latin version by Godfrey Olearius (Leipzig, 1711). In 1664 Stanley published in folio a monumental edition of the text of Aeschylus.
His History of Philosophy was long the principal authority on the progress of thought in ancient Greece. It took the form of a series of critical biographies of the philosophers, beginning with Thales; what Stanley aimed at was the providing of necessary information concerning all "those on whom the attribute of Wise was conferred." He is particularly full on the great Attic masters, and introduces, "not as a comical divertisement for the reader, but as a necessary supplement to the life of Socrates," a blank verse translation of The Clouds of Aristophanes. Richard Bentley is said to have had a very high appreciation of his scholarship, and to have made use of the poet's copious notes, still in manuscript (in the British Museum, now the British Library), on Callimachus.