Five hundred years ago in the Feudal era, Mistress Centipede ate the sacred jewel (shikon no tama) and became much more powerful. She was killed by Shako (Sango's grandfather) in episode 147: The Tragic Love Song of Destiny. Her remains were thrown into the Bone Eater's Well. Shako also took the jewel from the remains of Mistress Centipede and gave it to the priestess Kikyo, who was chosen to protect the jewel from being used by demons and other evil-doers.
When Kikyo died, the jewel was cremated with her remains as she had instructed. When Kagome was born, her body contained the jewel because she was the reincarnation of Kikyo. In episode 1 on Kagome's fifteenth birthday, she approached the Bone Eater's Well where Mistress Centipede's bones lay. The proximity of the jewel causes Mistress Centipede's body to regenerate. She grabs Kagome and drags her into the well and into the past. However, using the jewel's power unconsciously, Kagome manages to tear an arm away from Mistress Centipede.
Despite her wound, Mistress Centipede attacked Kaede's village (near the Bone Eater's Well), where Kagome was. Kagome led her away from the village to the tree of ages (Goshinboku Tree) to which InuYasha was sealed by Kikyo's sacred arrow. InuYasha, awakened by the need of Kagome for help (as she is the reincarnation of Kikyou, she awakened him because she needed help), wished to be freed by Kagome. Mistress Centipede bit open Kagome, and the Jewel of four souls fell out of her wound. Mistress Centipede ate the fallen jewel and became much more powerful. Kagome breaks the seal on InuYasha so that he can save her. Mistress Centipede is slain (for the final time) by InuYasha. Kagome then removes the Jewel of Four Souls from Mistress Centipede before she can regenerate, forever destroying the demon.