The following appear to have occured in the year 1040 C.E.
- King Duncan I of Scotland was killed by Macbeth in a dispute over succession that provided the historical backing for the play by William Shakespeare.
- Harold I of England died and was succeeded by his half-brother Hardecanute.
- Fulk III Nerra, Count of Anjou, died, ending a 53-year long reign, and was succeeded by his son Geoffrey II (Geoffrey Martel).
- Gershom ben Judah, also known as Rabbenu, the head of the rabbinic acedemy in Mainz and a leading talmudic scholar known across Europe, died.
- Unsuri, one of the first Persian poets who left behind a diwan, died.
- The Arab mathematician Ibn al-Haytham or Alhazen, who specialized in optics and astronomy, died.
People were born:
- Divakara, the servant and advisor to four Cambodhian kings who proposed the building of Angkor Wat, was born.
- Lady Godiva, an Anglo-Saxon noblewoman, wife of the earl of Mercia and famed for a legendary naked horseback ride through Coventry, was born.
- Saint Ivo of Chartres, regarded as the most important canonist of his period, was born.
- Ladislas I, King of Hungary, who would later be considered the most beloved of all Hungarian kings, was born in exile in Poland.
- Gisulph II, Prince of Salerno and the last important Lombard ruler in southern Italy, was born.
- Ibn 'Aqil, an Islamic scholar and theologian of the Hanbali school, was born in Baghdad.
- Rashi, Rabbi Shlomo Yitzhaqi, the most reknowned Jewish medieval biblical and talmudic commentator, was born in Troyes in France.
- Aubrey de Vere, founder of the de Vere family that held the British hereditary titles of Lord Great Chamberlain and Earl of Oxford from the 12th to the 18th Century, was born in Normandy.
- The Tibetan poet, hermit, and yogi or saint Milarepa of the Bka'-brgyud-pa school of Tibetan Buddhism was born.
- Alfonso VI, King of Leon and later reunified Castile y Leon, who also declared himself Emperor of all Spain, was born.
- Ladislaus Herman , Duke of Poland from 1079 to 1102 and successor of his brother Boleslaus II, was born.
People did things:
- Casimir I, Duke of Poland, was restored, with German help, to the throne he was deposed from in 1037.
- Syracuse was captured by the armies of Byzantine Emperor Michael IV.
- The Seljuqs, under the leadership of Toghrïl Beg, defeated the Ghaznavids under Sultan Ma'sud I at the battle of Dandanqan and thus became rulers of Khorasan.
- Braga, in northern Portugal, was recaptured from the Moors by Ferdinand I, King of Castile y Leon.
- The Zenaga Berbers established a Muslim monastery in the Senegal valley, whose Tukulor inhabitants they subsequently converted to Islam.
- Bretislav I, Prince of Bohemia, defeated Henry III of Germany in the Vserubsky Pass.
- Berengar of Tours was appointed Archdeacon of Angers.
- Lanfranc, an Italian theologian who would become Archibishop of Canterbury, came to Bec in France where he founded an important school of religious learning.
- Printing with movable woodblocks was invented by Pi Sheng in China.
Sources: Encyclopædia Britannica Online and Infoplease