Agnes Stewart was natural daughter of James, Earl of Buchan, who was second son of Sir James Stewart, the Black Knight of Lorn, by Queen Joan, widow of King James I. and thus the uterine brother of King James II.
She had, before her marriage, borne to King James IV a daughter named Janet Stewart, who was married (contract penult February 1523) to Malcolm (third Lord Fleming.) The spouses had a charter dated 28 October 1527, wherein she is designate sister of the King (i.e. of King James V).
On [28 August 1511] the King granted the barony and Castle of Crichton and others, on the resignation of Adam, Earl of Bothwell, to Agnes Stewart, (daughter of the deceased James, Earl of Buchan), whom he married, doubtless immediately afterwards. On 14 November 1512, a charter of the same date granted by Adam, Earl of Bothwell, with consent of his curators, was confirmed. He was killed at the battle of Flodden, 9 September 1513, having distinguished himsel in command of the reserve during the action.
(1) Adam, second Earl of Bothwell, had by Agnes Stewart, his wife, an only son,
Patrick Hepburne, who was an infant about a year old when he succeeded as third Earl of Bothwell on 9 september 1513...
(2) Agnes, Countess of Bothwell, was married, secondly, on 3 June 1514, to Alexander (third) Lord Home, Great Chamberlain of Scotland, who was executed for treason on 8 October 1516.
(3) She was married thirdly, between 4th December 1520 and the date of a document preserved in the library of the Society of Antiquaries of Scotland (of which the year 1526 is entered, but not a day or month of execution), to Robert (fourth [sic] - fifth) Lord Maxwell. The deed is a gift of certain lands to him and Agnes, Countess of Bothwell, his spouse. Lord Maxwell died in the year 1546.
(4) She was married fourthly, before 13 December 1549, to Cuthbert Ramsay, brother-german to George Ramsay of Dalhousie, who is designate Captain of Crichton, and styled burgess of Edinburgh in the testament of Jonet Fleming his relict spouse, confirmed 3 October 1570.
Agnes Stewart, Countess of Bothwell bastard, natural daughter of the deceased James, Earl of Buchan, obtained letters of legitimation from Queen Mary on 31 October 1552.
She died in the month of February 1557.
After her death, the Queen, notwithstanding the legitimation, made a gift to James, Earl of Bothwell (the Countess’s grandson), of the escheat of her goods moveable and immoveable, by reason of her having been born and died a bastard;
and Cuthbert Ramsay brought an action against the Earl in consequence. The widower was long at feud with his late wife’s son and grandson. Earl Patrick on one occasion seized him when on his way to Stirling to visit Mary of Lorraine, the Queen-Dowager, and imprisoned him in Crichton Castle.
Source: THE SCOTS PEERAGE, ed. by Sir James Balfour Paul, Vol II , Edinburgh, 1906, pp. 156-7
James IV King of Scots
Janet Stewart Fleming