Samuel Melvill (sometimes Melville) was the son of John Thomas Melvill and his wife Anna Frederica, born Stadler. He requested permission to practice as a land surveyor in the Cape Colony in 1849. From January to September 1851, during the Eighth Frontier War, he served as captain commanding the George native levy. He was wounded in action in the Amatole valley (west of King William's Town) on 28 June that year and as a result lost an arm. He married Martha Henrietta Amelia Ahrens in George on 18 August 1852. They had thirteen children, including E.H.V. Melvill* and George Melvill*.
In spite of his handicap Samuel continued his career as a sworn land surveyor, qualified to do government work in the Cape Colony. By 1857 he resided in Cape Town, but during 1862 surveyed a number of farms and crown lands near Prince Albert. In 1873 he extended W. Bailey's* triangulation in the south-east of the colony into the division of Fraserburg, over an area of some 10 000 square kilometers. He started from two of Bailey's stations on the Nuweveld Mountains, which divide the division of Fraserburg from that of Beaufort West. One of the points that was connected to Bailey's survey by this work was the steeple of the Dutch Reformed Church at Fraserburg. Melvill then performed extensive surveys of Crown land in the Fraserburg division.
In July 1873 he moved to the Transvaal and until October 1874 was commissioner of Lichtenburg and agent for native affairs on the south-western boundary of the territory. He was then appointed surveyor-general of the South African Republic, following the death of M.J.F. Forsmann*, and served on the commission for road repairs. When the British took over the administration of the Transvaal in April 1877 he retained his post as surveyor-general, stationed in Pretoria. He served on the town's Municipal Board, and in June that year was appointed to a committee charged with the planning of a new botanic garden in the town. He held his post until August 1881, just after the conclusion of the First Anglo-Boer War, when he was succeeded by G.P. Moodie*.
Melvill returned to the Cape Colony and on 1 July 1882 was appointed second assistant surveyor-general of the colony under surveyor-general A. de Smidt* and first assistant surveyor-general J.T. Horne*. During 1885 he surveyed crown lands in the division of Aberdeen, and from 1889 served also as railway expropriation commissioner. When Horne succeeded L. Marquard* as surveyor-general of the Cape Colony in July 1892, Melvill was promoted to first assistant surveyor-general, a post he held until 1896, when he presumably retired at the age of 68. He died the next year.