He was eldest son of Sir Robert Montgomery, 3rd Baronet, by his wife Anna or Antonia, second daughter and coheiress of Sir John Scott of Rossie, Fife. His father died on 7 February 1684, and James became his heir on 3 February 1685. In April 1684 his widowed mother made a strong appeal to him to make suitable provision for her and her fatherless children, but to this he replied that, for the sake of peace, he had already conceded more than legal obligations required. On 2 October 1684 Montgomery was imprisoned and fined for harbouring covenanters, religious rebels, and on 7 May 1685 he and his mother were pursued on account of conventicles held in his father's lifetime, but both pleaded that they were not responsible.
Revolution of 1688
Montgomery visited Holland in connection with the invitation to William of Orange to invade England on behalf of Protestantism; but Balcarres rejects the notion that Montgomery had any commission to do so, since he possessed no influence, "except with some few of the most bigoted fanatics". He was chosen as member for the county of Ayr in the Convention of the Estates of Scotland which met on 14 March 1689, when he distinguished himself by his eloquent advocacy of the resolution proposed by Sir John Dalrymple, that King James had forfeited his throne and kingdom. The resolution being carried, Montgomery was named one of three commissioners for the shires to offer the Scottish crown to William III and Mary II. After the convention had been formally converted into a parliament, he continued to sit for Ayrshire until he was obliged to stand down in 1693 for not having signed the Assurance. His ambition had already selected the office of secretary of state for Scotland, as that alone commensurate with his services and abilities; and when George Melville, 1st Earl of Melville, chiefly on account of his moderate opinions, was preferred, Montgomery, although offered the office of lord justice clerk, so deeply resented the supposed slight that he determined at all hazards to have revenge, and immediately set himself to organise a political society called The Club, the main purpose of which was to concert measures against the government.
Montgomery Plot
In parliament he led with great ability and eloquence the opposition against Sir John Dalrymple, the two, according to Balcarres, frequently scolding each other "like watermen". Towards the close of the session he went to London with his closest confederates, the Earl of Annandale and Lord Ross, to present a declaration of Scottish grievances to the king, but the king declined to listen to their complaints. Thereupon Montgomery entered into communication with the Jacobite agent, Neville Payne, and they concerted together a plot for the restoration of King James, known as the Montgomery Plot, each being, according to Balcarres, more or less the dupe of the other. Montgomery's coalition with the Jacobites proved to him rather a hindrance than a help in parliament, and as soon as his influence began to wane the Jacobites revolted against him. A quarrel ensued, and soon afterwards Lord Ross made confession of his connection with the plot to a presbyterian minister, who informed Melville. On learning this Montgomery went to Melville, and on promise of an indemnity confessed all he knew, making it, however, a condition that he should not be obliged to be "an evidence or legal witness". Melville sent him, with a recommendation in his favour, to Queen Mary, to whom he pleaded for "some place which might enable him to subsist with decency". She wrote on his behalf to King William, but the king had conceived such an antipathy to him that he declined to utilise his services on any consideration. According to Gilbert Burnet, Montgomery's "art in managing such a design, and his firmness in not discovering his accomplices raised his character as much as it ruined his fortunes". After lying for some time in concealment in London, he passed over to Paris, where he was well received by the Jacobites. Some time afterwards he returned to London, and on 11 January 1694 was taken into custody, on the accusation of being the author of several virulent papers against the government; but on the 18th he made his escape from the house of the messenger where he was confined, the two sentinels who guarded the door leaving their arms and going with him. He escaped to the continent, reaching Paris by 15 February, and he died at St. Germains before 6 October 1694. By Lady Margaret Johnstone, second daughter of James Johnstone, 1st Earl of Annandale, he had two sons: Robert and William.
Works
Montgomery was the author of "The People of England's Grievances to be enquired into and redressed by their Representatives in Parliament", reprinted in SomersTracts, x. 542-6. The authorship of other political pamphlets attributed to him has been claimed by Robert Ferguson the Plotter, and in some instances there may have been a joint authorship. A portrait of Montgomerie in armour has been engraved.