Baptised on 24 January 1632 at Newhall in Lanarkshire, he was eldest and only surviving son of James Somerville of The Drum and Lilias, second daughter of Sir James Bannatyne of Newhall, a lord of session. James's father had gained military experience in France, as an officer in the Scots guard of Louis XIII. On the outbreak of the First Bishops' War in 1639, the elder Somerville joined the covenanting levies under General Alexander Leslie, and with the rank of major had a leading command at the siege of Edinburgh Castle in 1640. James joined his father's company at this siege.
Campaign against Cromwell
In 1645 the teenage Somerville was present at David Leslie's first cavalry muster on the Gleds Muir, Tranent. The death of both his younger brothers in 1647 left him the only heir male of his house, and his parents said that he should never leave Scotland. In 1648 his father, having purchased from a cousin the old family seat at Cambusnethan in Lanarkshire, moved there from The Drum, and arranged for his son's marriage with Martha Bannatyne of Corhouse. After Oliver Cromwell's advance into Scotland, the match was put off. The Scots levies concentrated at Edinburgh. Somerville went there with his father, and served in the retinue of the Earl of Eglinton, captain of the king's guard of horse. He saw service, at most of the military actions which took place between the two armies, including the Battle of Dunbar. After Dunbar, Somerville returned to Cambusnethan, and found it partially occupied by levies of the Presbyterian Association, with whom he had a sharp skirmish. Then in company with Bannatyne of Corhouse, his intended father-in-law, he went north to Perth where Charles II held court. Towards the end of November he returned with his cousin, Major-general Robert Montgomery, who was in command of a body of cavalry that was designed either to operate against, or come to terms with, the Association levies under Colonels Gilbert Ker and Archibald Strachan. After Montgomery had passed Stirling and was on the road to Dumbarton, he gave Somerville a commission to discover if the Association forces were willing to come to an agreement. He went to Renfrew, and arrived in time to take part in a concentration of Royalist forces on Ruglen, which was intended to check Cromwell's advance on Hamilton. Four Cromwellian regiments of cavalry, then made a night march on Hamilton, and occupied the town, but, after a sharp encounter, were driven out and dispersed the next morning. Somerville, after sending a message to Montgomery, spent three days with the laird of Cathcart, till the country was clear, and then returned to Cambusnethan. Cromwell, however, had rapidly regarrisoned Hamilton, and was making the country dangerous for the Royalists. Somerville and his father therefore retired over the Forth, and were present at the coronation of Charles II at Scone on 1 January 1651. With other Royalists they then paid their respects to the Duke of Hamilton, who was with the Earl of Crawford at the Struthers, Fifeshire. Somerville's father placed him in the king's guard, again only as a volunteer. When Charles II decided to march into England, Somerville senior removed his son from the royal guard, to keep him in Scotland. The army's line of march passed within a short distance of the Corhouse, where Martha Bannatyne, Somerville's bethrothed, was living; she sent Somerville junior a message, prompted by Somerville senior. He came and was shut until the army was too far off to be rejoined. The couple married at Lesmahagow church on 13 November 1651, after the Royalist defeat at the Battle of Worcester, with James Somerville still 18 years old.
Later life
The death of his father on 3 January 1677 left Somerville as the successor to the family peerage; but, like his father, he declined to assume the title. He died in 1690.
Works
Somerville collated the records of his family, and completed in 1679 The Memorie of the Somervilles, written mainly for his sons. The two folio volumes remained unprinted among the family papers until 1815, when they were edited by Sir Walter Scott, and published with notes and corrections.
Family
By his first wife, who died in 1676, Somerville had three sons: James, born 26 Aug. 1652; John; and George. On 15 March 1685 he married, secondly, Margaret Jamieson, and had issue a daughter Margaret and a son Hugh. The Somerville title remained in abeyance until it was recovered by a great-grandson, James Somerville, 13th Lord Somerville.