Son of James Fraser, he was born in Prestbury, Gloucestershire on 8 May 1824 and was educated at Kings College and Addiscombe before joining the Bengal Engineers in 1843. He saw action in the Sutlej Campaign in 1845–46, in the Punjab in 1848–49 and during the Second Anglo-Burmese War in 1852–53 under General Scudamore Winde Steel. He worked on the construction of lighthouses on the Burmese coast and served as chief engineer in the Northwest Provinces. He also worked with the Indian Railways serving as Chairman of the Railways of the Nizam, Rohilkund and Kumaon. He was created a Companion of the Order of the Bath in 1880.