William was born circa 1142, during the reign of his grandfather King David I of Scotland. His parents were the King's son Prince Henry and his wife Ada de Warenne. William was around 10 years old when his father died in 1152, making his elder brother Malcolm the heir apparent to their grandfather. From his father William inherited the Earldom of Northumbria. David I died the next year, and William became heir presumptive to the new king, Malcolm IV. In 1157, William lost the Earldom of Northumbria to Henry II of England.
Malcolm IV did not live for long, and upon his death on 9 December 1165, at age 24, William ascended the throne. The new monarch was crowned on 24 December 1165. In contrast to his deeply religious, frail brother, William was powerfully built, redheaded, and headstrong. He was an effective monarch whose reign was marred by his ill-fated attempts to regain control of his paternal inheritance of Northumbria from the Anglo-Normans.
Traditionally, William is credited with founding Arbroath Abbey, the site of the later Declaration of Arbroath.
He was not known as "the Lion" during his own lifetime, and the title did not relate to his tenacious character or his military prowess. It was attached to him because of his flag or standard, a red lion rampant with a forked tail (queue fourchée) on a yellow background. This (with the substitution of a 'double tressure fleury counter-fleury' border instead of an orle) went on to become the Royal Banner of Scotland, still used today but quartered with those of England and of Ireland. It became attached to him because the chronicler John of Fordun called him the "Lion of Justice".
William was a key player in the Revolt of 1173–74 against Henry II. In 1174, at the Battle of Alnwick, during a raid in support of the revolt, William recklessly charged the English troops himself, shouting, "Now we shall see which of us are good knights!" He was unhorsed and captured by Henry's troops led by Ranulf de Glanvill and taken in chains to Newcastle, then Northampton, and then transferred to Falaise in Normandy. Henry then sent an army to Scotland and occupied it. As ransom and to regain his kingdom, William had to acknowledge Henry as his feudal superior and agree to pay for the cost of the English army's occupation of Scotland by taxing the Scots. The cost was equal to 40,000 Scottish Merks (£26,000). The church of Scotland was also subjected to that of England. This he did by signing the Treaty of Falaise. He was then allowed to return to Scotland. In 1175 he swore fealty to Henry II at York Castle.
The humiliation of the Treaty of Falaise triggered a revolt in Galloway which lasted until 1186, and prompted construction of a castle at Dumfries. In 1179, meanwhile, William and his brother David personally led a force northwards into Easter Ross, establishing two further castles, north of the Beauly and Cromarty Firths; one on the Black Isle at Ederdour; and the other at
Dunkeath, near the mouth of the Cromarty Firth opposite Cromarty. The aim was to discourage the Norse Earls of Orkney from expanding beyond Caithness.
A further rising in 1181 involved Donald Meic Uilleim, descendant of King Duncan II. Donald briefly took over Ross; not until his death (1187) was William able to reclaim Donald's stronghold of Inverness. Further royal expeditions were required in 1197 and 1202 to fully neutralise the Orcadian threat.
The Treaty of Falaise remained in force for the next fifteen years. Then the English king Richard the Lionheart, needing money to take part in the Third Crusade, agreed to terminate it in return for 10,000 silver marks (£6,500), on 5 December 1189.
William attempted to purchase Northumbria from Richard in 1194, as he had a strong claim over it. However, his offer of 15,000 marks (£9,750) was rejected due to wanting the castles within the lands, which Richard was not willing to give.
Despite the Scots regaining their independence, Anglo-Scottish relations remained tense during the first decade of the 13th century. In August 1209 King John decided to flex the English muscles by marching a large army to Norham (near Berwick), in order to exploit the flagging leadership of the ageing Scottish monarch. As well as promising a large sum of money, the ailing William agreed to his elder daughters marrying English nobles and, when the treaty was renewed in 1212, John apparently gained the hand of William's only surviving legitimate son, and heir, Alexander, for his eldest daughter, Joan.
Despite continued dependence on English goodwill, William's reign showed much achievement. He threw himself into government with energy and diligently followed the lines laid down by his grandfather, David I. Anglo-French settlements and feudalization were extended, new burghs founded, criminal law clarified, the responsibilities of justices and sheriffs widened, and trade grew. Arbroath Abbey was founded (1178), and the bishopric of Argyll established (c.1192) in the same year as papal confirmation of the Scottish church by Pope Celestine III.
William died in Stirling in 1214 and lies buried in Arbroath Abbey. His son, Alexander II, succeeded him as king, reigning from 1214 to 1249.