Melville was born in New York City, on August 1, 1819, the third of eight children to Allan Melvill (1782–1832) and Maria (Gansevoort) Melvill (1791–1872), who were of Scottish and Dutch descent.