Elizabeth Eulberg has written four lighthearted middle grade mysteries starring crackerjack sleuth Shelby Holmes, and eight young adult novels about girls weathering the everyday oscillations of their teenage years. But in Past Perfect Life (Bloomsbury, July), she charts a weightier fictional course as she writes about a teen whose world is upended when she applies for college and discovers that everything she has been told about her life is untrue.

Eulberg said that her inspiration came from a 2015 TV news broadcast about a boy who found out that his life was based on lies. “The story resonated with me,” she said. “At one point in the broadcast, a sheriff said something along the lines of, ‘Can you imagine finding out your entire life has been a lie?’ ” she recalled. “I couldn't get that thought out of my head. I spent a year, while working on another book, contemplating what it would be like to find out in high school that everything you thought you knew about who you were and where you came from was wrong. We put such trust in our parents, and I started thinking a lot about personal history, identity, and above all, family. I thought a lot about the character of Ally and what her circumstances would be and how that revelation would change her life.”

Eulberg found this to be the most difficult book she’s ever written. “I not only delved into darker territory than ever before, but for the first time I was writing from the point of view of a character who is really confused,” she said. “I didn’t know what she wanted because she didn’t know what she wanted. I had to figure out the most logical steps she had to take to get through it all, especially when she shut down and became emotionally numb.”

By contrast, Shelby Holmes continues to keep Eulberg chuckling, as the young detective cracks her fourth case in The Great Shelby Holmes and the Case of the Haunted Hound. “Every Shelby Holmes case takes inspiration from one of Sir Arthur Conan Doyle's original Sherlock Holmes stories,” she explained. “With this new book, I decided to tackle one of the most famous: The Hound of the Baskervilles. Haunted house mysteries were some of my favorite as a kid to read, and I had a lot of fun writing this book. One of my favorite parts of this story is that Shelby and Watson already know their client, John Bryant. If his name is familiar, it's because he is one of Watson's friends—and he is not a fan of Shelby’s. Needless to say, there is some tension!”

Eulberg is obviously quite at home in Shelby’s world. “I find writing middle grade joyous—and I always love talking to readers who are that age,” she said. “Creating Shelby Holmes mysteries uses a different brain muscle, and I love writing about a heroine who is smarter than I am.” Before returning to Shelby’s world, Eulberg plans on writing her first standalone middle grade novel, about which she’s keeping mum.

For now, the author is focusing on introducing her fans to Past Perfect Life. “You never know what to expect when you veer off your customary path,” she said. “It’s exciting, but also a little scary. Every time I hear someone say they like my new book, I feel relief. I’m always nervous when a novel comes out. But this is the most nervous I’ve been in a while.”

Past Perfect Life by Elizabeth Eulberg. Bloomsbury, $18.99 July ISBN 978-1-5476-0092-2