His mother was Janet, daughter of Donald Macleod of Bernera. The father, son of Dugald Macpherson, minister of Duirinish, distinguished himself in classics at Aberdeen University (M.A. 1728, and D.D. 1761), and was minister of Barra in the presbytery of Uist (1734–42), and of Sleat (1742–65). He published Critical Dissertations on the Origin, Antiquities, Language, Government, Manners, and Religion of the Ancient Caledonians, their Posterity, the Picts, and the British and Irish Scots, London, 1768, and paraphrased the Song of Moses in Latin verse in Scots Magazine, vols. i. ix. xi. He upheld the authenticity of the poems assigned to Ossian, and Samuel Johnson declared that his Latin verse did him honour. Martin Macpherson (1743–1812), Dr. Macpherson's elder son, succeeded him at Sleat, and won Dr. Johnson's regard when the doctor visited the highlands.

In March 1767 he sailed for India, nominally as purser of an East India ship, commanded by his maternal uncle, Captain Alexander Macleod. Macpherson landed at Madras, where he obtained an introduction to Mohammed Ali, Nawab of the Carnatic. The latter, whose affairs were in great disorder, had borrowed large sums of money at high interest from the East India Company's officials at Madras. Hard pressed by his creditors, he entrusted Macpherson with a secret mission to Britain, with the object of making representations on his behalf to the home government. Macpherson arrived in Britain in November 1768. He had several interviews with the prime minister, Augustus FitzRoy, 3rd Duke of Grafton, who eventually despatched Sir John Lindsay, as king's envoy extraordinary, to effect a settlement of the Nawab's claims. This commission being novel and unwarrantable, the company protested, and Lindsay was recalled.[3]

Macpherson returned to India in January 1770 with the position of a writer in the company's service. He remained for six years at Madras occupied with administrative work. He also renewed his acquaintance with the nabob, for whom, as he himself confesses, he occasionally procured loans of money. In 1776 George Pigot, 1st Baron Pigot, the governor of Madras, obtained possession of a letter addressed to the nabob by Macpherson, in which details were given regarding the latter's mission to Britain. The paper contained severe reflections on the company's action, and indicated that Macpherson had engaged in a plot to set the home government against them. He was therefore dismissed the service. He returned to Britain in 1777, having previously furnished himself with fresh despatches to the home government from the nabob.[3]

Macpherson remained in England for four years. From April 1779 to May 1782 he sat in the House of Commons for Cricklade, and was one of six members suspected of being in receipt of a salary from the nabob of Arcot in return for pressing the latter's claims on the legislature.[3]

Macpherson had appealed to the court of directors against his dismissal by the Madras council. The former were by no means satisfied with the intrigues indulged in by their servants in the Carnatic, and reinstated him. In January 1781, however, before he could return to Madras, he was appointed by Lord North, whose government he had supported, to the seat on the Supreme Council of Bengal vacated by Richard Barwell. The appointment was severely criticised in public; and in 1782 a committee of the House of Commons declared that Macpherson's past conduct in supporting the pretensions of the nabob had tended to endanger the peace of India.[3]

Macpherson offered a regular but unintelligent opposition to the measures of Warren Hastings during the latter years of that governor-general's rule.[3]

In February 1785, as senior member of the council, he became governor-general on Hastings's resignation. Owing to the long and desperate war in which the British had been engaged, he found the finances in great disorder. Pressing demands for assistance were coming from Bombay and Madras, the arrears of pay due to the troops amounted to two millions sterling, and the deficit in the revenue of the current year was estimated at 1,300,000 Pounds.[3]

Macpherson began by using the actual cash in the treasury to pay the troops, who were on the verge of mutiny. All other payments were made in bonds bearing interest at eight per cent. per annum till redeemed. Strenuous reductions were made in the public expenditure, the utmost care was exercised over the collections, and in twelve months' time enough cash had been accumulated to pay off the whole of the new paper debt, besides meeting the ordinary expenses of government. At the close of his administration Macpherson was able to boast that he had reduced expenditure by the large sum of 1,250,000 Pounds. It must, however, be remembered that during his rule no war took place; and his financial achievements were really due to the suggestions of a subordinate, Jonathan Duncan. Macpherson moreover did nothing to stop the gross corruption indulged in by the company's officials, and Lord Cornwallis, an impartial critic, denounces his government as ‘a system of the dirtiest jobbery’.[3]

Shortly after Macpherson's accession to the supreme power, the Mahratta chief, Maharaja Mahdoji Sindia, having obtained possession of Shah Alum, titular emperor of India, demanded from the English a sum of 4,000,000 pounds. as arrears of the tribute promised by them to the emperor in 1765. Macpherson answered by insisting upon an immediate withdrawal and disavowal of the claim, threatening war if it were repeated. To further guard against the ambition of Sindia, he established Charles Malet as English envoy at Poonah, the acknowledged capital of the Mahratta confederacy. In 1786 the Mahrattas declared war against Tippu, sultan of Mysore. Macpherson offered them the assistance of three battalions to be employed in defending the Mahratta territories. The offer remained unaccepted during Macpherson's tenure of office, and was withdrawn by his successor.[3]

Macpherson was created a baronet on 10 June 1786, and was superseded, much to his dissatisfaction, by Lord Cornwallis in September, after which he returned to Britain.[3]

His friends endeavoured to show that the legal term of the governor-generalship was five years, and that Macpherson's removal, save for misconduct, after only twenty months was an injustice. The claim, for which there was no foundation, was disregarded, and Macpherson now endeavoured to obtain from Dundas a promise of the succession to Lord Cornwallis, or at any rate a return to his old place on the Bengal council. This also was refused. Macpherson's sole object in harassing the government with these demands was to obtain some heavy pecuniary compensation, and when his chances of office became quite hopeless, he applied to the court of directors for a pension of 2,000 pounds. a year. After some delay he obtained a sum of 15,301 Pounds 7 Shilling, payable in three instalments between 1 March 1789 and 1 March 1790. In June 1809 he obtained in addition a pension of 1,000 pounds a year in return for assigning to the company a claim of 10,000 pounds on the nabob of Arcot.[3]

In 1788 Macpherson was again elected to the House of Commons for Cricklade, but was unseated for bribery on the petition of his opponent, Samuel Petrie, and cast in penalties to the amount of 3,000 pounds. He now joined the whig opposition, and was till 1802 on intimate terms with the Prince of Wales.[3]

In 1789 he visited Florence, where his advice was asked by the Grand Duke Leopold on financial and administrative matters. When Leopold became emperor in 1790 he visited him at Vienna. Macpherson's tall figure, handsome face, and courtly manners made him a great favourite in society; and his wide knowledge and linguistic talents won him the respect of scholars.[3]

In 1806, in a discussion on Indian affairs, Whitshed Keene, the member for Montgomery, availed himself of the opportunity to censure his relations with the nabob of Arcot. Macpherson replied to the implied charges in an Open Letter to Whitshed Keene, Esq., M.P., dated 31 May 1806. He stated that in 1777 he had, through his intimacy with the nabob, obtained knowledge of secret overtures made to that prince by France, the exposure of which had been of great service to the British government. He also added that his claims on the nabob were still unpaid.[3]

George McElroy (1987). "Ossianic Imagination and the History of India: James and John Macpherson as Propagandists and Intriguers". In Jennifer J. Carter; Joan H. Pittock. Aberdeen and the Enlightenment. Aberdeen University Press. pp. 363–374. ISBN978-0-08-034524-6.