Malcolm IV lived from 1141 to 9 December 1165 and was King of Scotland from 24 May 1153 to 9 December 1165. He was the grandson of David I. Malcolm's father, Henry of Scotland, 3rd Earl of Huntingdon, had died in 1152, leaving him as the heir to the throne. He was just 12 when he was crowned King of Scotland at Scone. The wider picture in Scotland at the time is set out in our Historical Timeline.
Throughout his reign the pious and frail Malcolm was consistently out-thought and outmanoeuvred by Henry II, who was crowned King of England in 1154, much to the dismay of many Scottish nobles. In 1149 Henry had promised David I he would uphold Scotland's claim to much of northern England. But in 1157 Henry summoned Malcolm to meet him at Chester. There they signed the Treaty of Chester under which Malcolm relinquished Scottish claims to Cumberland, Westmorland, Northumbria, and Carlisle. In return he was granted the Earldom of Huntingdon: arguably his by rights anyway in succession to his father.
This was not a good deal by any standards, though perhaps Malcolm judged that his refusal might spark a war with Henry II. With all the resources of Normandy, Aquitaine and England at his disposal, Henry was probably not the best man to go to war against at the time.
On his return to Scotland, Malcolm was besieged in Perth Castle by forces under the command of a number of Scottish nobles. Reconciliation was achieved following the intervention of the church: but it should have been clear to Malcolm the Maiden, as he was becoming known, that his dealings with Henry were not popular at home. Malcolm raised further concerns in Scotland when in 1159 he went to France with Henry II of England and supported him in the siege of Toulouse.
Others also sought to take advantage of Malcolm's perceived weakness during his reign. He successfully suppressed a major rebellion in Moray, but had a harder time dealing with Somerled, King of the Isles, who was building a power base in Argyll and trying to carve out a separate kingdom covering much of the territory that once made up Dalriada. Matters came to a head when Somerled landed an army of 15,000 men from 164 galleys at Greenock in 1164. He intended to capture Renfrew, but somewhere near Inchinnan (close to the site of today's Glasgow Airport), Somerled was betrayed and killed. His army departed without engaging in a full scale battle.
Despite Malcolm's unpopularity, it seems that his own death on 9 December 1165 in Jedburgh at the age of 24 was from natural causes. He was buried in Dunfermline Abbey. Malcolm was succeeded by his younger brother William I, or William the Lion.