The regiment was raised on 18 March 1689 by David Leslie, 3rd Earl of Leven to defend Edinburgh against the Jacobite forces of James VII. It's claimed that 800 men were recruited within the space of two hours. The regiment's first action was at the Battle of Killiecrankie on 27 July 1689. Although this battle was a defeat for the Williamite army, the Jacobite commander, John Graham, 1st Viscount Dundee (Bonnie Dundee), was killed by a volley fired by Leven's Regiment, bringing an end to James II's attempt to save his throne in Scotland. The regiment was judged to have performed well and was granted the privilege of recruiting by beat of drum in the City of Edinburgh without prior permission of the provost.