Miaoshan then coluntarily took on the guilt of her would-be executioner out of compassion for his sake.
She was then sent to hell because of the executioner’s bad-karma guilt. But while there she used her accumulated good merit from many lifetimes to save many beings from hell for enlightenment.
Her actions thereby caused hell to become a kind of paradise, and the king of hell then let her go back to earth.