Sandeman was born on 25 February 1835, the son of General Robert Turnbull Sandeman. He was educated at Perth and University of St Andrews, and joined the 33rd Bengal Infantry in 1856. When that regiment was disarmed at Phillour by General John Nicholson during the Indian Rebellion of 1857, he took part in the final capture of Lucknow as adjutant of the IInd Bengal Lancers. After the suppression of the Mutiny he was appointed to the Punjab Commission by Sir John Lawrence.