 He served from 1843 to 1864, rising to the rank of Major in the 3rd Bombay Native Infantry.Raverty fought in the Punjab campaign of 1849–1850 and Swat campaign of 1850.He compiled a gazetteer of Peshawar.