He became a first lieutenant on 6 May 1825, and after almost thirty years service as a subaltern was promoted to captain on 10 July 1837. Soon after he joined the battalion of marines doing duty in Spain during the First Carlist War, and subsequently went to China, where he commanded the marine battalion in the demonstration against Nanking at the close of the First Anglo-Chinese War. He was promoted to major on 11 November and lieutenant colonel on 26 November 1851, and to colonel on 20 January 1854. In July–August 1854 Graham commanded a brigade of marines at the capture of Bomarsund Fortress, on the Åland Islands, during the Baltic campaign, and was made a Companion of the Order of the Bath in July 1855. He served as the Colonel Commandant of the Portsmouth Division of Royal Marines from 1855 to 1857, and as Aide-de-camp to the Queen from 1854 to 1857. He was made a major general in 1857, served as Colonel of the Plymouth Division from 1863, was made a lieutenant general and a Knight Commander of the Order of the Bath in 1865, General and Colonel of the Royal Marine Artillery in 1866, and finally retired in 1870.