Bobby Hall, better known as the Grammy-nominated rapper Logic, started writing his debut novel, “Supermarket,” four years ago. He had released “The Incredible True Story,” a dystopian concept album in which two men search for a planet named Paradise in the wake of Earth’s destruction, and finished the script for a film, “Everything Must Go,” now in development with J.J. Abram’s production company, Bad Robot.

He was looking for a new project. “I didn’t want to necessarily just be stuck in music,” he said. “Supermarket,” just published by Simon & Schuster, is a psychological thriller that centers on Flynn, an aspiring writer who has been dumped by his girlfriend. Depressed and desperate for change, he takes a job at a supermarket, hoping to find inspiration through daily minutiae. But nothing is what it seems, and the novel quickly takes twists and turns while tackling issues including depression and anxiety.

It’s not the first time he has addressed mental health in his work: His song “1-800-273-8255,” titled after the National Suicide Prevention Lifeline, has gone platinum five times.

Hall, 29, recorded an accompanying soundtrack timed to the novel’s release this week. He does not consider himself a big reader, he said, but credits Indiana Jones novels and H.G. Wells’s “The Time Machine” as inspirations for the kind of story he wanted to tell.

“Bobby is the quintessential multi-hyphenate. He’s a natural storyteller,” Stuart Roberts, Hall’s editor at Simon & Schuster, wrote in an email. “I was instantly taken by the book’s voice and inventiveness.”

I talked to Hall about his debut as a writer, mental health, the importance of music to him and what he hopes his fans will take away from this project.


CreditSonny Figueroa/The New York Times

“Supermarket” deals with a number of mental health issues — from anxiety and depression to schizophrenia and bipolar disorder. What research did you do before writing the book?

The research I did was all personal. I had an anxiety attack and almost passed out when I was in line to see “Star Wars” in December 2015. I was in the most depressed, anxiety ridden place of my life. My mother was bipolar. She took heavy medication to deal with it, and I grew up with friends who were schizophrenic, so I experienced that firsthand.

Did you face any challenges while writing the book? How did the process differ, if at all, from writing music?

One of the biggest challenges was writing something that stemmed from real life. Nobody wants to talk about anxiety and depression and being scared and feeling crippled at times. It’s not a fun thing to discuss. I have written scripts for my albums before, I have done concept albums, so I guess it is something that has been building up.

What do you hope readers to take away from it?

I guess the biggest thing is as long as you deal with your problems head-on and face your demons, whatever they may be — mental, physical, emotional — if you truly deal with it, it gets better. And that you can do anything you want. I am a dude with no formal education. I didn’t even graduate from high school. But you can’t let that tear you down.

Your characters listen to a lot of contemporary music and artists, like Toro y Moi and Rex Orange County. Can you talk about the relationship between music and the novel?

I thought it would be really cool if when readers see that artist’s name and the song on that page, maybe they will play that song while they read. We tend to associate our emotions and experiences with what we are listening to or watching. I just thought it would be cool to add these artists who have given me great memories and pass that on to readers.

Are there any other songs or albums or artists you were listening to while writing the book?

Oh, definitely — I actually created a playlist on Spotify.

Did you always know that you were going to record the soundtrack?

It definitely came from writing the book. I was at my old house and making these songs about love. I was feeling kind of lonely, and I realized that is also how Flynn felt. When I was writing these songs for a woman that didn’t even exist at the time, it kind of hit me like, I want to do more than just rap. I love hip-hop, I love rap, it’s in my blood. And it is scary as a musician to have a world of people who know who you are, and that when you do something different, different is not good. Nobody likes different. These were songs that almost would have never come out because I would have been too scared. But I think that fear is a good thing.

Let’s talk about the album. How does it relate to the book?

It’s not like my other albums — that is why I am so proud of it. It’s all indie music, and if you listen to this playlist you can hear some elements of that in the soundtrack as well.

It’s really based on love, and I’ve never done that. I did a couple of love songs in raps when I was 20 and didn’t know a thing and I’ve gone through some ups and downs; I have gone through some very hard times; and beautiful, amazing times. So I decided to write about those, and kind of put myself in Flynn’s position and almost sing as though I were him and be inspired by my own life.