Duncan I (a.k.a. Donnchad mac Crínáin) lived from 15 August 1001 to 15 August 1040 and was King of Alba from 25 November 1034 to 15 August 1040. The wider picture in Scotland at the time is set out in our Historical Timeline.
Duncan was the maternal grandson of Malcolm II, who he succeeded to the throne: the first time the Scottish crown had passed down the direct line rather than being distributed around the extended family under the law of tanistry.
Until Malcolm's rule, the Crown of Alba had passed backwards and forwards between different strands of the House of Alpin under the law of tanistry, under which the extended family elected the successor from candidates across the family. This had ceased simply through Malcolm's move to kill anyone he thought likely to be a challenge to the succession of his own line.
It would seem that Duncan was neither a very good nor a very popular king, and today he is largely remembered (thanks to William Shakespeare's rather fictional approach to history) for his rivalry with his cousin Macbeth. In 1030 Duncan married Suthen, the cousin of Earl Siward Biornsson of Northumbria. Two of their sons, Malcolm III Canmore and Donald Bane went on to be Kings of Scotland.
By 1040, Macbeth's challenge for the crown was becoming more serious, in part because he had formed an alliance with Earl Thorfinn of Orkney (another cousin of his and of Duncan's). The three met in battle near Elgin on 15 August 1040 and Duncan was killed. He was later buried in the graveyard at Saint Oran's Chapel on the Isle of Iona. Duncan was succeeded by Macbeth.