Aleksandar Hemon’s latest novel, “The World and All That It Holds,” was 13 years in the making.

The author first wrote the proposal for the book in 2010 but soon realized that the century-spanning epic would take a great deal of research. He read “shelves and shelves” of history books while writing the novel, and still kept busy with other jobs. In the years since he started it, he published four other books; wrote scripts with his friends Lana Wachowski, a filmmaker, and David Mitchell, a novelist; and moved to New Jersey, where he’s now a professor of creative writing at Princeton University.

But through all that, his mind was never far from “The World and All That It Holds.” The novel follows Pinto, a Jewish pharmacist in Sarajevo whose life is changed forever when Archduke Franz Ferdinand is assassinated in his hometown in 1914. Pinto is conscripted into the army, where he meets and falls in love with Osman, a charming Muslim soldier. The two do their best to survive the battlefields of World War I, and the uncertain worlds that come after, as the narrative shifts from Europe to central Asia to China.

It’s something of a personal novel for Hemon, a Sarajevo native who moved to the U.S. in the early 1990s, learning English in the states and publishing his first short story in the language just a few years later. Hemon spoke about his new novel — and other projects — via Zoom from Princeton. This conversation has been condensed and edited for clarity.

Q In some ways, this is a World War I novel, but it’s really so much more than that.

A A lot of it happens at the time of World War I, but I would think of it as more of a short 20th-century novel. Historians claim, with good reason, that the 20th century lasted between the day that Archduke Ferdinand was assassinated in Sarajevo to 9/11. And the last chapter in the book takes place a couple of days before 9/11, so it covers, but not evenly, the 20th century.

Q How did the idea for this novel come to you?

A I don’t remember the moment of inception, but I remember that the thing that made me start thinking about it was a memoir by a British spy, Frederick Bailey. He was sent to Tashkent from India to Turkestan, which was part of the Russian Empire at the time, to see what was going on with the trouble in mainland Russia. By the time he made it to Tashkent, the full Bolshevik Revolution was taking place, then the Bolsheviks took power, and then they were chasing him all around Tashkent and Central Asia.

He ran into a guy from Sarajevo named Mandic who told him, “I know who you are. I know you’re a spy, so I’ll protect you, but we have to work together because I want to get out of here.” So he hires Bailey to work for the Cheka, which is pursuing Bailey around Tashkent, under a different name. Eventually, they plan to spread a rumor that Bailey is somewhere else, so they get papers from the Cheka to go and kill Bailey, and that’s how they escape, by way of Persia. Mandic disappears and Bailey becomes a famous spy. I read this, and I thought, “Oh, I like this, the idea of someone who would do anything just to go back home.” I could totally identify with that. And the evolution of the idea led to the novel.

Q Pinto is such a fascinating character. What was his origin?

A I wanted someone who would be multilingual. Sarajevo Jews were mostly Sephardic, but a few of them came with the Austrians, and they were more integrated. Their native language was German, whereas the Sephardic Jews were expelled from Iberia in 1492, and they ended up in the Ottoman Empire because they were not killing them there, and many of them ended up in Sarajevo. They spoke Ladino, which came from 15th-century Castilian Spanish. So I wanted Pinto to speak Bosnian, the language of the city, and Ladino, and be bilingual from birth. And that develops further into his acquiring German in Vienna, and then picking up other languages along the way. I’m multilingual, so to me, that kind of consciousness is interesting and familiar in some way, but there’s also a lot to explore there too.

Q You’ve written for the show “Sense8” and the film “Matrix Resurrections.” Did you enjoy the screenwriting process?

A I loved every minute of it. I did it with friends, people I already liked and would do anything with them. Lana and I are friends, and she was the one dealing with the industry. David Mitchell and I, she kind of protected us from all that. We didn’t have to deal with the suits and such. She might have received notes from the studios, but David and I never did.

But it was like being in a toy room with friends the whole time. I cannot complain about anything. I think these are great works of art in and of themselves, but I love them because when I see the posters or watch them I think, “These are the people I love. I did this with people I love.”

Q There’s an album coming out that’s connected with the book, right? And did I read that you have an album of your own coming out?

A Part of the story of the book is that I contacted a friend of mine, who’s a brilliant and famous singer of traditional Bosnian music called Sevdah, midway through writing the book. His name is Damir Imamovic. Sevdah is similar to the blues, in that it’s seemingly sad, but also there’s pleasure in singing and performing it. It’s melancholic but also pleasurable, not depressing. They’re usually love songs, unrequited love,

In the book, Pinto and Osman sing to each other, both Sephardic songs and songs that come from the Muslim tradition. So I contacted my friend and said, “How about you record an album with some of those songs, and how about you write some songs about the two of them?” So he recorded it, and it’s going to be released by Smithsonian Folkways in May.

So that’s the album, but unrelated to the book, during the pandemic, I also started producing music. And we’ll drop an album, also in May, which is not traditional at all and does not have a direct connection with the novel. It’s very much influenced by European dance music, but it has guitars and … yeah, it’s weird.

Q It sounds like there aren’t a lot of art forms that you’re not doing now. Like, you’re going to start sculpting or something next year.

A This is difficult enough. But who knows? There are many ways in which I don’t like myself, but one of the things I like about myself is the steady supply of curiosity. The world is interesting to me. People are interesting to me; language is interesting to me. This is what drives me generally.