Malcolm (who is also known by the by-name Canmore, from the Gaelic Ceann Mor meaning "large-headed") was the son of king Duncan I. "Malcolm" is itself an Anglicanization of Gaelic, Mael Coluim or "servant" or "follower of Columba", in reference to the saint of that name.
Malcolm was born in 1031(though his mother is unknown)(1); in 1040 his father was killed by MacBeth, who took the throne. Malcolm fled to England, where he had an uncle, Siward. There he obtained protection at the court of Harthacanute, and later his successor Edward the Confessor. In 1053 Edward agreed to help Malcolm win back the Scottish throne, and Malcolm invaded, obtaining support from the nobles of southern Scotland.
In 1057 he finally faced MacBeth in battle and, MacBeth falling, Malcolm took the throne in the following year, after he had also killed MacBeth's son, heir and successor, Lulach.
He was crowned in April 1058 at Scone, and in 1065 or thereabots, he married Ingibjorg, widow of the Earl of Orkney and related to the kings of Norway, thus wedding himself into the Norse line which had governed in the northern islands for centuries, and beginning the process of welding them into Scotland. The two had three sons: Duncan (who would become Duncan II, Donald (named for Malcolm's brother and successor Donald III), and Malcolm, but only Duncan survived beyond his twenties.
Ingibjorg must have died at some point prior to 1070, because Malcolm married Margaret, daughter of Edward Atheling, sister of Edgar. She and her relatives were themselves in exile (as he had been), because William of Normandy had excluded them from the English succession. By her he had several children, three of whom, Edgar, Alexander I, and David I, were to take the Scottish throne (in succession), and a fourth, Edith (otherwise Matilda), who married the king of England, Henry I. Their names (half English, half Continental) point to an increase in "foreign" influences on the king, centring round his queen, something Malcolm tried to counter by waging wars against the Norman English kings after 1066, but in 1072 he was obliged to swear subservience to William the Conqueror. In 1093, fighting aganst William Rufus, he was obliged to cede territory, and in the same year, he and Edward (his eldest son by Margaret) were killed.
He was succeeded by his brother Donald III but his line, the House of Dunkeld, would rule Scotland until 1286.
(1) One source names her as Suthen of Northumbria, who would presumably have been daughter to Siward, the Earl..