His elder brothers included Sir James Cosmo Melvill, secretary of the East India Company; Philip Melvill, Military Secretary to the India Office; and Henry Melvill, principal of the East India Company College.