Andersen's bittersweet fairy tales propelled their troubled author to international fame and revolutionized children's writing.