Canute was the son of Sweyn Forkbeard, King of Denmark, who had conquered England during the reign of Ethelred the Unready. When Swyen died in 1014, Ethelred came back to the throne, and when Ethelred died in 1016, his son Edmund II Ironside succeeded him. Canute, however, decided he wanted to rule England as his father had, and fought Edmund. The two eventually agreed to split the kingdom, but Edmund died within a year and Canute had England to rule alone. (He cemented his power by killing off as many other possible heirs as he could, such as one of Ethelred's younger sons; others fled the country.) He also conquered Norway in 1030, giving him quite an empire.

The version of the legend given in my sources is that Canute's advisors were trying to flatter him into thinking he was all-powerful, and he went to prove them wrong by commanding the tide to stop coming in, knowing he would fail. He then told them to realize "how empty and worthless is the power of kings." (This story is sometimes used as a Christian parable; some versions say Canute placed his crown on a statue of Christ after the tide came in.)

Canute died in 1035, probably aged around 40. His son Harold I Harefoot succeeded him to the throne of England (though not Denmark).