In 1644, Leven commanded the Army of the Solemn League and Covenant as it marched to England to take part in the unsuccessful Siege of York, before participating in the Battle of Marston Moor as senior commander of the allied Army of Both Kingdoms which included the two English parliamentary armies led respectively by Ferdinando Fairfax and the Earl of Manchester. Under Leven's command these forces inflicted a crushing defeat on the Royalists under Prince Rupert. The allied army then invested and captured York which surrendered within a fortnight. Later in the year Newcastle also fell after a spectacular siege and storm campaign. When Charles I surrendered to the Army of the Solemn League and Covenant at Newark in 1646, he was placed under the charge of Leven. As part of the negotiation for the Army of the Solemn League to leave England, Leven transferred the king to his Presbyterian allies unaware that these would soon lose power to the Independents. Nevertheless, Leven remained in control of Northern England and only agreed to relinquish his garrisons there when back-pay owing to his troops had been paid. The final instalment of this came in January 1647 after which Leven marched his army back across the Scottish border.