MacGill is regarded as having been the chief representative of the Clan Makgill and though engaged in the administration of Queen Mary (of Guise) apparently he remained a committed Protestant. When Master of MacGill, he occupied the manse in Flisk, later being knighted as Sir James MacGill of Nether Rankeillour, an estate three miles south of Cupar in Fife. His successor as Lord Clerk Register, James Balfour (later Lord Pittendreich), previously held the manse in Flisk.
Regency of Queen Mary
MacGill was appointed Lord Clerk Register of Scotland when Mary of Guise formed her administration in 1554. On 25 May 1557 he was one of a delegation who met with Mary I of England's delegation near Carlisle by the Water of Sark. There, in the run-up to Peace of Cateau-Cambresis, he proposed that the Scots would not break any peace treaty with England to appease French interests. MacGill was a commissioner for the final negotiation of the Peace at the Kirk of Steill in May 1559, called the Treaty of Upsettlington.
During the crisis of the Scottish Reformation, MacGill and John Bellenden of Auchnoul searched the records of Scotland to find precedents for trying Regent Arran and his son James Hamilton, 3rd Earl of Arran, who had joined the Protestant cause, for treason. Yet by August 1559, he had secret meetings with the English commander and Captain of Berwick, Sir James Croft, saying that the Queen Regent's council were mostly joined with the Protestants. However, on 25 November 1559, he asked for the keys of Edinburgh Castle on behalf of the Regent, and was refused. Later, during the Siege of Leith he remained with the Queen Regent at Edinburgh Castle.
Personal rule of Mary, Queen of Scots
When Mary returned to Scotland in 1561 she appointed him a Privy Councillor. MacGill was unhelpful to the English agent Thomas Randolph who wanted details of the divorce of Margaret Tudor and Earl of Angus, the grandparents of Lord Darnley. After the murder of David Riccio, the Papal Nuncio advised the removal of six men from Court to restore peace, including Bellenden and MacGill, described as "a man of no family and contriver of all evil". After Mary escaped to England, MacGill was one of the party who produced the casket letters at York which alleged to implicate Mary in the death of Darnley, and he attended Elizabeth I and her Council at Hampton Court in late October 1568.
Under James VI
In 1570 MacGill reluctantly accepted appointment as Provost of Edinburgh. In November 1571, during the War between Leith and Edinburgh when Mary's supporters held Edinburgh Castle, MacGill was sent with Robert Pitcairn, Commander of Dunfermline to negotiate with Henry, Lord Hunsdon at Berwick upon Tweed. MacGill was to ask for 8 cannons, 3000 footmen and pikemen, and support for 1000 Scots troops, in the cause of the "maintenance and protection of the true religion to the confusion of those that now goes about to disturb the same". MacGill had a particular interest in the siege as the "registers and records of the chief matters" were guarded by artillery at Edinburgh Castle, together with the Scottish Crown jewels. The forces holding Edinburgh Castle, known as the Castilians, in 1572 twice destroyed MacGill's stronghouses in Edinburgh, and while the siege lasted the Burgh Council met in exile at Leith.
Regent Morton wrote to MacGill in 1575 asking him to re-negotiate a gold and silver mining contract with the Dutch engineer Cornelius de Vos. A portrait painter working in Scotland at this time, Arnold Bronckorst, was associated with Cornelius and Nicholas Hilliard. Morton also obtained passports for MacGill's sons, John and David, to travel to France to continue their studies.
MacGill's wife, Jane Adamsoun or Adamson) was a noted Protestant. John Knox wrote to her from Lyon in 1557 as one of his "sweet sisters". His letter mentions that he had previously written to her on the subject of "what duty a wife owes her husband"; Knox said he had referred the matter to John Calvin.
When Janet wrote to Thomas Randolph, an Englishman, in April 1583, she reminded him of her husband's "duty and good service to his country, together with his love and maintenance of peace, unity, and concord betwixt our two nations, whenever the occasion was offered here, or when he was employed and sent in commission to your country".
- Ritchie, Pamela E., Mary of Guise in Scotland, 1548 - 1560, Tuckwell (2002), 125.
- Ritchie (2002), 177.
- Calendar State Papers Scotland, vol. 1 (1898), 198, 11 June 1557, Thomas Martyn to Elizabeth: Ritchie (2002), 178.
- Calendar State Papers Scotland, vol. 1 (1898), 212-214.
- Ritchie (2002), 236-8.
- Calendar State Papers Scotland, vol. 1 (1898), 239, 5 August 1559, Croft to Cecil
- Calendar State Papers Foreign Elizabeth 1559-1560, London, Longman (1865), 153, 30 November 1559, John Wood to Randolph.
- Cody & Murison ed., Dalrymple, James, trans., The Historie of Scotland by Jhone Leslie, vol. 2, Scottish Text Society (1895), 435.
- Calendar State Papers Scotland, vol. 1, (1898), 602, 12 February 1562, Randolph to Cecil.
- Anthony Ross, in McRoberts, David ed., Essays on the Scottish Reformation, Glasgow (1962), 412-3, citing JH Pollen, Papal Negotiations, (1901), 278.
- Calendar State Papers Scotland, vol. 2, (1900), 527, 11 October 1568, Norfolk, Sussex, Sadler to Elizabeth.
- HMC Marquis of Salisbury, vol. 1 (1883), 370, minute by Cecil.
- Extracts from the Records of the Burgh of Edinburgh 1557-1571, Scottish Burgh Records Society (1875), 277-8, 304.
- Cameron, Annie I., ed., The Warrender Papers, vol. 1, Scottish History Society (1931), 104-111, 14 November 1571, Regent Mar's instructions.
- Lynch, Michael, Edinburgh and the Reformation, John Donald (1981), 283, 304-5, 364.
- HMC Laing Manuscripts preserved in Edinburgh University, (1914), 25-6: Atkinson, Stephen, Gold Mynes in Scotland, Bannatyne Club (1825), 33-35
- Calendar State Papers Scotland, vol. 5 (1907), 223, 357
- Knox, John, 'Familiar Letters', in Laing, David, ed., The Works of John Knox, vol. 4, Johnstone & Hunter, Edinburgh (1855), pp. 244-245
- Lynch, Michael, Edinburgh and the Reformation, John Donald (1981) , 277, 283, 366.
- Boyd, William K., Calendar State Papers Scotland, vol. 6 (1910), 417-8.
- Calendar of the State Papers relating to Scotland and Mary Queen of Scots 1547–1603, H.M. General Register House Edinburgh, vol. 1, ed. J. Bain, (1898)
- Henderson, Thomas Finlayson (1893). "Mackgill, James". In Lee, Sidney. Dictionary of National Biography. 35. London: Smith, Elder & Co.