He was made a lieutenant-fireworker on 31 March 1778, and a first lieutenant in October that same year. In 1786 he was promoted to captain. During the Third Anglo-Mysore War he commanded a company of Bengal artillery detached to Madras. He served at the Siege of Bangalore, Battle of Arakere, and Siege of Seringapatam. In March 1801, at Cawnpore, Horsford addressed a paper to Lord Lake setting forth the defects in organisation of the artillery branch and that same year was advanced to Major. He commanded the artillery under Lord Lake during the Second Anglo-Maratha War in 1803–5, including the battles of Siege of Aligarh and Delhi, siege of Agra, sieges Deeg and Bhurtpore. In 1804 he was made Lieutenant-Colonel. He commanded a brigade and also directed the artillery at the siege of Komanur, August–November 1807. On the resignation of Colonel Nicholas Carnegie in 1808 Horsford succeeded to the command of the Bengal artillery, of which he remained virtually the head until his death.