Born the son of Gregory Haines, a commissariat officer, and Harriet Haines (née Eldridge), Haines was educated at Midhurst Grammar School and the Royal Military College, Sandhurst before being commissioned into the 4th Regiment of Foot on 21 June 1839. He was promoted to lieutenant on 15 December 1840 and appointed aide-de-camp to General Sir Hugh Gough (his eldest brother's father-in-law) in 1843. Haines took part in the Battle of Mudki in December 1845 and the Battle of Ferozeshah (where he was severely wounded) in December 1845 during the First Anglo-Sikh War. Promoted to captain in the 10th Regiment of Foot on 16 May 1846, he exchanged to the 21st Royal North British Fusiliers on 31 March 1847 and then fought at the Battle of Ramnagar in November 1848, the Battle of Chillianwala in January 1849 and the Battle of Gujrat in February 1849 during the Second Anglo-Sikh War before being promoted to brevet major on 7 June 1849 and to brevet lieutenant colonel on 2 August 1850.