History of magic

Magic is strongly related to each edition of Dungeons & Dragons and significate changes have occured to magic when the rule editions change. This artical has references thoughout it where the rules have changed

The birth of Mystryl
Lord Ao created the universe. At first it was nothing but energy, with neither light nor dark, heat nor cold. Eventually the energy created two deities – Selûne and Shar. Together they created heavens and Chauntea, the embodiment of the world of Toril. Chauntea begged for light and warmth so that she could create life on the new world, but Shar opposed this vehemently. The subsequent war between the sisters created new deities – war, murder, and destruction among them. When Selûne lit one of the nearby heavenly bodies on fire to provide the light and warmth needed, Shar became enraged, trying to extinguish light everywhere. Selûne tore the energy from her own body and flung it at Shar, where it joined with Shar's energy and passed from both of them, thus creating the goddess of magic, Mystryl. The birth of Mystryl not only brought a truce to Selûne and Shar, but created the Weave. In the newly created Toril, magic abounded in everything, but in its raw state it was too dangerous for mortals to use. The Weave is a like a fabric, consisting of many threads, all woven together to create an intricate design. Spellcasting and the use of magic items pulls individual threads and reweaves them, creating a new design. Now both mortals and deities could use magic through this fabric that was both the embodiment of Mystryl and a conduit to raw magic.

The death of Mystryl and the birth of Mystra
2nd edition Dungeons & Dragons When the Phaerimm, a race dwelling under the surface of the earth, began to cast spells draining the empire of Netheril of its magic, a powerful mage named Karsus created a link to Mystryl in an attempt to steal her power, become a god and save his empire. This caused a great rift in the Weave, and Mystryl was so weakened that she sacrificed herself to save the world. Since she was the Weave, magic immediately ceased all across Toril. A new goddess of magic named Mystra was born, and she was able to repair the weave in a way that such powerful spells could never be used against it again.

The death of Mystra and the birth of Mystra
3rd edition Dungeons & Dragons

The death of Mystra and the Spellplague
4th edition Dungeons & Dragons