Yamada then tries to find out the truth of what happened. He ultimately gathers the male witches to hold a ceremony to restore everyone's memories. As he goes through his senior year of high school, he plans to apply to a prestigious university. However, when Urara suddenly disappears from his life along with the witches powers and everyone else's memories of her, Yamada discovers she was the original witch. Urara had agreed to the witch powers in order to have a relationship with Yamada, but on the condition that her memories of him to be erased again when she leaves school. However, when she returns at graduation, Yamada finds a way to get her to remember again. Ten years later, Yamada has become a successful businessman who is looked up to by his coworkers and keeps in touch with his high school friends, but has yet to propose to Urara. The two get married and some years later, share their story with their two children. Manga author Miki Yoshikawa's previous work, "Flunk Punk Rumble" (Yankee-kun to Megane-chan) ran in Kodansha's "Weekly Shōnen Magazine" from 2006–2011, with a total of 211 chapters. Her editor suggested for her next project that she write a one-shot for "Bessatsu Shōnen Magazine". She developed two stories: a prototype story for "Yamada-kun" and "The Demon's Classroom". The second story was initially chosen, but became difficult to run because the main character was a grade school girl. The prototype "Yamada" story eventually became the first chapter for "Yamada-kun". In the "Natalie" interview, Yoshikawa said that she had thought of the body swapping idea in the "Yankee-kun" days, and had researched some medical books on the differences between men and women, both physically and emotionally, but generally went with it because she liked the idea. "It just kind of came to me, but I was wondering how a guy finding himself in a girl’s body would react, and the reverse". She treats a body-swapped character as an entirely different character. At Anime Expo 2015, she said that she initially thought about gender swapping first but later rejected that as a potential magic power. When it was noted that the main characters for both of her works were delinquents, Yoshikawa replied that those types of characters came easily for her, as she grew up in the lower end of Tokyo. The characters and their names are not based on her friends so that they can act crazy.