Under the encouragement and support of the Goddess of Dark Night, Shar, the God of Conspiracy, Shylock, infiltrated the Heart of the Curse and murdered the Magic Goddess, Midnight, leading to the collapse of the Magic Network, which triggered an unimaginable calamity.
The Magic Network is also known as the Weave of Magic.
In Toril, most people believe that the original Magic Goddess, Mistela, created it. That statement is true but not entirely accurate.
The Weave of Magic has always existed because magical elements permeate every corner of the Multiverse; every stone, every river, every living thing, even the very air harbors magic, each with its own operating rules, which together constitute the most fundamental Magic Network.
Mistela merely refined this foundation, creating a magical network that facilitated spellcasters' perception of the elements.