Murray's father obtained a commission for him as a lieutenant of the Saxon Army's Grenadier Guards, with a two-year leave to complete his studies. Taking up his commission in 1751, he served in the Seven Years' War, battling the Prussians until the capitulation that followed the Siege of Pirna. He obtained his release through the efforts of Andrew Michell, the British envoy to Frederick the Great. Returning to Scotland, he was given a captain's commission in his uncle's regiment, the Black Watch, and was placed in command of one of the companies being raised for the French and Indian War. He then sailed to North America and joined the fighting in New York State. His own company was left to garrison Fort Edward, but he was wounded at Fort Ticonderoga in 1758 while leading Captain Reid's company. The wound was not serious, and he was present for Amherst's campaign on Lake Champlain the following year. Late that year he was given command, at his uncle's recommendation, of the grenadier company of the 2nd Battalion of the regiment, raised in the previous year. He led them to the surrender of Montreal in 1760. In 1761, the Black Watch was posted to the West Indies, and Murray fought with them in the capture of Martinique. He was wounded during the engagement, a musket ball passing through the left lobe of his left lung and crossing under his chest to lodge under the scapula. He was at first thought mortally wounded, but was up and about in a few weeks, and had regained health and appetite by the time he was invalided home to England. However, the wound left him permanently disabled, and unable to lie down for the rest of his life, sleeping in an upright posture. He spent over six years on sick leave recovering. Murray returned to the Black Watch in 1768, and was appointed lieutenant and captain in the Scots Guards in 1769. He was promoted captain and lieutenant-colonel the following year. Murray was elected Member of Parliament for Perthshire in 1774, a seat he held for the next 21 years. He supported Lord North's administration. He was also Governor of Upnor Castle from 1775 to 1778. In 1776, he bought his mother's estate of Strowan from his nephew, the Duke of Atholl. After the outbreak of the American War of Independence, he offered to raise a new Highland regiment, but was refused. He joined the Brigade of Guards in North America in March 1777, where he was wounded during the Philadelphia campaign. Promoted to the rank of colonel on 16 December 1777, he was appointed the colonel of the Atholl Highlanders, newly raised by the Duke of Atholl, on 16 May 1778. He commanded them in Ireland until the regiment was disbanded in 1783. In 1780, Murray was appointed Governor of Fort William. This was the year of the Gordon riots. Murray denounced his kinsman Lord George Gordon, and, when the rioters Gordon had stirred up prepared to storm the House of Commons, he threatened to put a sword through Gordon, who was sitting next to him, if they broke in. During his later years in Parliament he supported William Pitt the Younger. He became a major general in 1782, and on the disbanding of the Atholl Highlanders, was appointed lieutenant-colonel commandant of the 78th Highlanders. He was appointed their colonel when they were renumbered the 72nd in 1786, and was made a lieutenant general in 1793.
Personal life
Murray died unmarried on his 60th birthday in 1794.