Forbes was the son of a Scottish minister in the county of Elgin, and entered the army when a mere boy as an ensign in the 78th Highlanders, or Ross-shire buffs, when Francis Humberstone Mackenzie, afterwards Lord Seaforth, raised the regiment in March 1793. He was promoted lieutenant on 3 May 1794, and in the following September his regiment joined the army in the Netherlands, under the command of Lieutenant-Colonel Alexander Mackenzie Fraser. He served with distinction in all the affairs of the disastrous retreat before Pichegru, and was especially noticed for his behaviour at Geldermalsen on 5 January 1795. He was present at the affair of Quiberon and the attack on Belle Isle in that year, and in 1796 he proceeded with his regiment first to the Cape and then to India. He remained in India more than twenty years, seeing much service. In 1798 his regiment formed the escort of Sir John Shore when he dethroned Wazir Ali Khan, the Nawab of Awadh, and it was engaged throughout the Maratha campaign of 1803, and especially at the storming of Ahmednagar.
Promotions and service in Java
For his services in this campaign Forbes was promoted captain on 25 June 1803, and he remained in garrison until 1811, when his regiment was selected to form part of the invasion of Java in 1811, under Sir Samuel Auchmuty. He was placed in command of the flank companies of the various British regiments, and at their head led the assaults on the lines at Waltevreede and Fort Cornelis, and was to the front in every engagement with the Dutch troops. For these services he was five times thanked in general orders, received the gold medal for Java, and was promoted major on 29 Aug. 1811. In May 1812 he commanded the grenadiers of the 59th regiment and the light companies of the 78th in an expedition for the reduction of Hamengkubuwono II, the Sultan of Yogyakarta, and in May 1813 he suppressed the serious insurrection which broke out among the Malays at Probolinggo in the east of the island of Java. In this insurrection Lieutenant-colonel Fraser of the 78th was killed, and Forbes, as major, received the step in promotion on 28 July 1814. In 1817 he returned to Scotland, being the only officer who returned out of forty-two, and bringing with him only thirty-six out of twelve hundred rank and file. He went on half-pay and settled at Aberdeen, where he lived without further employment for the rest of his life. On 10 January 1837 he was promoted colonel, in 1838 made a C.B., and in 1846 promoted major-general. He died in Aberdeen on 29 March 1849.