Although storybooks are often used as pedagogical tools for conveying moral lessons to children, the ability to spontaneously extract "the moral" of a story develops relatively late. Instead, children tend to represent stories at a concrete level - one that highlights surface features and understates more abstract themes. Here we examine the role of explanation in 5- and 6-year-old children's developing ability to learn the moral of a story. Two experiments demonstrate that, relative to a control condition, prompts to explain aspects of a story facilitate children's ability to override salient surface features, abstract the underlying moral, and generalize that moral to novel contexts. In some cases, generating an explanation is more effective than being explicitly told the moral of the story, as in a more traditional pedagogical exchange. These findings have implications for moral comprehension, the role of explanation in learning, and the development of abstract reasoning in early childhood.