Sir James MacGill, Lord Rankeillor of Nether Rankeillour. (died 1579) was a Scottish courtier and Senator of the College of Justice.

Sworn of the Privy Council by Mary, Queen of Scots in 1561, he became her Lord Clerk Register (Keeper of the Scots Royal Archives). He was knighted as Sir James MacGill of Nether Rankeillour.

Although engaged in the administration of Queen Mary (of Guise) he remained a committed Protestant. He occupied the manse in Flisk, 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.

Early life
He was the son of James MacGill of Nesbit, an Edinburgh burgess, and his wife, Helen Wardlaw.

Regency of Mary of Guise
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 MacGill a Privy Councillor. MacGill was unhelpful to the English agent Thomas Randolph when he requested details of the divorce of Margaret Tudor and the 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 were alleged to implicate Mary in the death of her husband Lord Darnley. He attended Elizabeth I and her Council at Hampton Court in late October 1568.

Under James VI
In 1570 MacGill was reluctantly appointed 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, Commendator of Dunfermline to negotiate with Henry, Lord Hunsdon at Berwick upon Tweed. MacGill asked 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 held in Edinburgh Castle with the Scottish Crown jewels, by Mary's supporters. In 1572 the force holding Edinburgh Castle led by William Kirkcaldy of Grange and known as the "Castilians" 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 died on 16 October 1579. Alexander Hay succeeded him as Lord Clerk Register. His executors were his wife Janet Adamsoun and their son, Master James MacGill.

Janet Adamsoun
MacGill's wife, Janet 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.

In 1584, as a supporter of the strongly Protestant William Ruthven, Earl of Gowrie, Janet was banished from Edinburgh. In 1585 she vacated a house on the north side of the Royal Mile which belonged to the sons of a wealthy apothecary, Thomas Thomson.

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".

Their children included:
 James MacGill
 John MacGill
 David MacGill
 Rachael MacGill, who married (1) Stewart of Rosyth, and (2) in 1584, Archibald Wauchope of Niddrie, and was the mother of Francis Wauchope, named after Francis Stewart, 5th Earl of Bothwell.

In November 1575 David and John both went to France for their education.

References

Sources
 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)
 

1513 births
1579 deaths
People associated with Fife
16th-century Scottish people
Provosts of Edinburgh
Members of the Privy Council of Scotland
Privy Council of Mary, Queen of Scots
Scottish knights
Scottish Reformation
Scottish diplomats
Senators of the College of Justice