Dorchester author Nathan Tavares is out with a new science fiction book, one he describes as a marriage and therapy story that's psychedelic and unabashedly queer.

“Welcome to Forever” follows the story of Fox, a “memory editor” who can digitally make people forget things they don’t want to remember. When Fox ends up in a memory recovery center with no idea how he got there, therapists tell him he was a victim of a terrorist bombing by a revolutionary against memory editing. The bombing has shredded the memory of many victims, including his husband Gabe. Fox tries to rebuild his life, his marriage and himself — while realizing the world around him is changing and unreliable as he uncovers secrets and conspiracies in his past memories.

Tavares joined GBH News to talk about his second book, “Welcome to Forever,” which is out March 5. What follows is a lightly edited transcript.

Haley Lerner: How did you come up with the idea for this novel?

Nathan Tavares: It's a story about a man who lost his memories and he's on this quest to save the lost memories of his husband. And then along the way, they both kind of get wrapped into this global cabal.

It's been in mythology, it's been in a million movies. The idea of someone saving the person they love from the underworld. So that's kind of the starting point. I love sci-fi, I love speculative fiction. So I got to thinking what that story would look like in a setting where we have kind of devised this technological immortality.

Lerner: This is a book you have been working on for a long time. Can you tell me about the process and how the story has transformed over the years?

Tavares: I finished the very first draft about 11 years ago. I finished the draft. I got an agent. We tried to sell it for about five years and it went nowhere. And then I stopped writing for a while. I lost a couple jobs. I sort of fell out of love with the act of writing.

And then I started writing another book, kind of in secret and not telling anyone. That ended up being my first published book, which is called “A Fractured Infinity.”

I was working with a new agent and we luckily secured a two-book deal from Titan Books, my publisher. Once I was editing that [earlier draft of “Welcome to Forever”] that was on the back burner — which was kind of my first book — I was reading it and I realized it didn’t reflect who I was now.

I essentially started over from the beginning, which was really scary but also really exciting at the same time. When I was starting that rewriting process, I got to this moment where I thought, “Oh my God, I don't know who wrote this book, but it wasn't me.”

This book helped me discover my voice, which I'm really thankful for, and I think that voice is experimental and weird and psychedelic and queer. And I think it really did take rewriting this story from start to finish to discover that.

Lerner: This is a science fiction novel. What was the process in creating a world like this in your book, and did you take inspiration from anywhere?

Tavares: I looked to a lot of movies like “Interstellar” and “Arrival.” I love the movie “Cloud Atlas,” and there's a book and a TV series called “Altered Carbon” that kind of deals with technological immortality in a similar way. And then also things like “Black Mirror” and the [season 3] episode “San Junipero,” which I love so much.

I was looking a lot to things that are happening in climate change and what that would look like in the world if we fast-forward the clock 50 or 100 years, and that definitely impacted things as well.

“We’re living in a time now where I’m very excited that we’re having stories that are about people — and queer people — in their 40s and 50s and 60s.”
Nathan Tavares, on contemporary love stories

Lerner: Living in Boston, a city that has so much technological development, did that influence your novel in any ways?

Tavares: Totally. I remember writing early on, when I lived in Fort Point at the time, and walking around the Seaport as it was changing almost week by week, and seeing these new buildings come up and all these lights and thinking, “Oh my God, I'm living in a future city right in this little neighborhood.”

Lerner: The core theme of this book is a man trying to save the man he loves. Can you talk about how this grounds the journey the book takes?

Tavares: I was really inspired by the idea of a love story between two men that lasts decades. We’re living in a time now where I’m very excited that we’re having stories that are about people — and queer people — in their 40s and 50s and 60s. I think for a number of reasons, including the ongoing HIV/AIDS crisis, we don’t have a lot of those stories.

Stories like this that are so deeply about a love between two queer people just did not exist at all when I was a kid. I’ve been wanting to be a writer since I was 7 or 8, and I devoured books left and right, and I just never really felt like I was represented in any of the stories. So, I thought at some point you should really write the story you want to read, one that has a lot of heart and a lot of humor and a lot of heartbreak.

Nathan Tavares will be at Brookline Booksmith on March 5 at 7 p.m. to discuss “Welcome to Forever.”