R. J. Palacio wrote Wonder after an incident where her son noticed a girl with a severe facial difference and started to cry. Fearing he would react badly, Palacio attempted to remove her son from the situation so as not to upset the girl and her family but ended up worsening the situation. Natalie Merchant's song "Wonder" made her realize that the incident could illustrate a valuable lesson. Palacio was inspired by Merchant's lyrics and she began writing. She named the book directly after the song and used the song's chorus as the prologue of the first chapter.