James Grahme (his own spelling) or Graham (1649–1730) was an English army officer, courtier, politician and Jacobite.
Born at Norton Conyers in Yorkshire in March 1649, he was the second son of Sir George Graham, bart., of Netherby, Cumberland, by his wife, Lady Mary Johnston, second daughter of James Johnstone, 1st Earl of Hartfell. He was educated under Richard Busby at Westminster School, and went as a gentleman-commoner to Christ Church, Oxford.
Grahme received from Louis XIV on 15 May 1671 a commission to be captain of the regiment of Scottish infantry of Douglas; on 29 March 1673 he was appointed by Charles II to the captaincy of a company of foot commanded by the Earl of Carlisle, and on 15 November of the same year he became captain of a company of the royal regiment of English infantry, his commission bearing the signature of Louis.
On 1 February 1674 Grahme was promoted to the captaincy of twelve companies composing two battalions of the royal regiment of English infantry commanded by the Duke of Monmouth, but on 3 November that year, while in camp at Dettweiler, he obtained leave from Turenne to return to England. From Charles he received, on 1 January 1675, the captaincy of Sir Charles Littleton's company of foot, and on 30 October following a captaincy in the Earl of Craven's company of foot. On 23 February 1678 Grahme became lieutenant-colonel of the regiment of foot commanded by Lord Morpeth, and also the captaincy of a company.
Grahme's looks and manner made him a favourite at court. There he fell in love with the beautiful Dorothy Howard, one of the maids of honour to the queen, and, after overcoming her mother's opposition, through the good offices of John Evelyn, was married to her at the end of 1675. By December 1679 he was keeper of the privy purse to the Duchess of York, and soon after was acting in the same capacity to James, Duke of York, with apartments in St. James's Palace.