When the movie Me and Earl and the Dying Girl – adapted by Jesse Andrews from his 2012 Abrams/Amulet novel of the same name—opens in theaters June 12, it does so already riding a wave of impressive early success. After being screened to a standing ovation at the Sundance Festival earlier this year, the film about a flying-below-the radar teenage boy pressured by his mother to befriend a girl with cancer walked away with the U.S. Dramatic Audience Award and the Grand Jury Prize. Fox Searchlight has since picked up distribution rights. Not bad for a debut author writing his first screenplay. As buzz around the movie (see the trailer here), and two new editions of the book, builds, PW spoke with Andrews about his novel’s unusual path from manuscript to feature.

“The machinery for the movie actually got moving before the book got published,” Andrews explained. He had spent his first six years out of college (Harvard, class of 2004, with a B.A. in History of Art and Architecture) working a variety of jobs and writing two manuscripts: literary fiction for adults that he describes as “big, ambitious, and grandiose – and not very good.” Andrews’s writing path changed course when he received encouragement from a college classmate, Maggie Lehrman, who was then an editor at Abrams (and has since left to write her own YA novel). “She suggested that I try writing something totally different – something for teenagers,” he said. That shift in perspective unlocked the story that became Me and Earl. Once Lehrman saw an early draft, Andrews recalled, “She told me, ‘This looks good. You might want to get an agent.’ ”

It turns out that doing things in a slightly unorthodox order worked in Andrews’s favor. When seeking representation, “I was able to go to William Morris Endeavor and tell them ‘I’ve got a publisher on the hook,’ ” he said. WME literary agent Anna DeRoy agreed to take him on and soon set about selling the movie rights as well as placing the book with Lehrman at Abrams (it was acquired in 2010). “She had the insane idea that I could also write the script,” said Andrews, and she brought writer-producer Dan Fogelman (Crazy Stupid Love; The Guilt Trip) into the loop. “Anna’s the one who put my book in front of him and in an incredibly generous moment he said he wanted to produce it,” Andrews said. “I was an unknown author who had never even read a screenplay front to back before, and he offered to shepherd me through the process. I realized this was an insane opportunity that I very probably would never get again, so it was a no-brainer for me to seize it.”

Andrews moved to Los Angeles and worked on the screenplay for two years, committed to “putting as much work into it as I could,” he said. “Dan and I did an outline together and we hung out for a few days at his house. We’d have a few beers and then he’d go meet with Al Pacino while I sat in the living room and scribbled stuff.” The first draft, noted Andrews, wasn’t so good, but he credits Fogelman’s patience – “we went over it page-by-page for four hours” – and encouragement as forces that helped move things ahead. After the second draft, Andrews said, “it became clear to Dan that I could take it to the finish line.” Production company Indian Paintbrush (The Grand Budapest Hotel; Moonrise Kingdom), enticed by Fogelman’s attachment, bought the rights and a director search landed Alfonso Gomez-Rejon. Along the way, it tied for the eighth spot on the 2012 Black List – the annual informal ranking by producers and movie executives naming scripts that they’ve read and liked. Filming of Me and Earl took place in summer 2014 in Andrews’s hometown of Pittsburgh, the book’s setting, and included such locations as Andrews’s former high school and his parents’ home.

“It’s really two different ways of telling the same thing,” Andrews said, comparing writing the book and screenplay. “What happens in the book, the growth of the characters, the lessons they learn, is very subterranean and concealed from view. But the movie cannot be that. In the movie those lessons must be foregrounded, but not in a treacly way.” Andrews learned some lessons of his own during the book’s transformation. “The space and time constraints of a screenplay are very different. Dan taught me a lot about economy and I had to learn to cast off what wasn’t important. I think all of this is a function of not having success in my writing all those years. Now I’m much less attached to any one outcome, but more attached to the process itself.”

While Andrews was ushering the book through Hollywood, the novel was having a somewhat quieter life of its own. By chance, it was released just two months after another certain book about a girl with cancer – John Green’s The Fault in Our Stars – came on the scene, and also began a successful movie run. “It was overshadowed by The Fault in Our Stars,” said Susan Van Metre, senior v-p and publisher of Abrams Books for Young Readers and Amulet Books. “Me and Earl had enthusiastic, devoted readers in-house and developed a cult following outside, but there was maybe not quite enough oxygen in the room for both books when they came out.”

Looking back on what hooked her and other early supporters of Me and Earl Van Metre said, “The voice is so frank. We have not done a ton of YA, but one of our successes was the ttyl series by Lauren Myracle, which was honest in a groundbreaking way. In a way, this is the boy voice to that. It’s an unbelievably honest depiction of high school and the battleground that it is. The voice of Greg, a kid who kind of hates himself, allows readers to see the potential in him more than he does. He’s immediately likeable.” Van Metre also lauded the portrayal of relationships in the book. “It’s about a non-romantic love between a boy and a girl, which you don’t see a lot in YA,” she explained. “It’s really refreshing.”

Van Metre and Andrews are both excited that the film will introduce the book to a new audience of readers. It was the first YA title ever chosen for World Book Night giveaway selection in 2014 and Abrams is reissuing a paperback edition with a new cover on April 21 as well as a movie tie-in edition just before the movie’s June release. The tie-in contains an author interview and a dozen or so annotated screenplay pages “so readers can see how adapting a book to film works,” said Van Metre. Marketing plans include a social media campaign, floor displays, and appearances by Andrews at BEA and BookCon in addition to a fall author book tour.

As Andrews reflected on the book and movie whirlwind, he noted, “I wasn’t trying to make a huge hit [with the book]. I just wanted to write something very honest, and hopefully funny that would find an audience that wasn’t tiny. I know the movie will have a broader appeal than the book will. But it’s a book I’m very proud of and I feel enormous gratitude for everything that has happened with it.”

Fans will be pleased to know that Andrews has just completed his second YA novel. “It’s called Haters and it’s about three teens who play music,” he says. “They meet at jazz camp and then they run away. It’s got lots of profanity, which is kind of my brand now, I guess.” The book is not yet under contract. And although he is working on a few other scripts at the moment, Andrews remains loyal to the teen audience. “The readers are so passionate and excited. It’s cool to feel their energy and love come back at you.”