“I got lost all the time,” says writer Min Jin Lee with a charming laugh, sitting in a hotel lobby in San Francisco’s Japantown.

Before a promotional appearance at a bookstore, she spoke to The Japan Times about writing her new novel “Pachinko,” a historical saga tracing four generations of a Korean family in Japan.

Despite the acclaim of her fiction debut “Free Food for Millionaires” in 2007, which was a best-seller in the U.S., Lee suffered existential self-doubt when producing her follow-up: the first English-language novel about the experience of Japan’s ethnic Koreans.

“I thought, ‘Nobody wants this book and I’m an idiot for having worked on it so hard,’ ” says Lee, who admires writers such as Leo Tolstoy and Charles Dickens. “But to succeed in writing, you must be willing to look stupid for a long time. ‘Pachinko’ took so long because I got it wrong so many times.”

Factual accuracy, as it turns out, was not the main challenge. Lee managed her sweeping history — which encompasses rural Korea in 1910 as well as Osaka, Japan, during World War II — by studying personal accounts, ethnographies and war diaries.

Much harder in terms of craft, she says, was achieving emotional authenticity. Lee, who emigrated from Korea to the U.S. at the age of 7, abandoned the first draft of “Pachinko,” afraid her characters had turned out stale and were chiefly defined by their suffering. A stay in Japan from 2007 to 2011 allowed her to interview Koreans in the diaspora, which helped to rectify misconceptions.

“They didn’t see themselves as victims,” Lee explains. “They were so tough that I felt foolish for having pitied them. The things that happened in history were horrid, but the Korean-Japanese I talked to weren’t waiting for an apology. They don’t expect things to get better or anyone to start telling the truth about the war. They’ve moved on and adapted. They save money to send their kids to school in America.”

This resilience informs the book, which opens with a perfect sentence: “History has failed us, but no matter.” It is a nod, in terms of technique, to Gustave Flaubert’s classic novel “Madame Bovary,” where a nameless first-person narrator appears only on the first page.

Lee extends the idea of resilience to the titular game of pachinko, which is central to the livelihoods of her protagonists: Like balls in a slot machine, her characters are thrown off track by historical forces. The game may be rigged, but the underdog keeps on playing.

Indeed, Korean history hasn’t been easy. When Japan annexed Korea in 1910, the taxes it introduced impoverished local farmers, rendering them economic migrants. Others were sent to Japan and forced to work in mining and construction.

During World War II, Koreans toiled in military factories, and some women were lured into sexual slavery for Japanese military brothels. Korean Christians, meanwhile, could be jailed, as the Korean independence movement was led by Presbyterian pastors.

Today, ethnic Koreans are the second-largest ethnic minority in Japan, after the Chinese. Ethnic Koreans are classified as foreign residents and required to state affiliation with either the North or the South. They may attain Japanese citizenship, which is difficult, but as a group they continue to be seen as foreigners.

Faced with persistent discrimination in finding housing and work, some ethnic Koreans pretend to be Japanese, adopting Japanese names and hiding their heritage (“a merciless and endless task,” Lee says).

While all of these issues feature in “Pachinko,” Lee never casts Japanese as villains. There is no resentment, only fraught, complex interaction. Lee thinks it unfair to blame modern Japan for the past — but what might the future hold for Koreans and Japanese?

“Things seem to be getting worse because the Abe administration is conservative,” Lee says. “Koreans are worried about the Japanese right-wing people, who tend to be against foreigners. But the Koreans in Japan aren’t even foreigners. They are essentially culturally Japanese. If a family has lived in Japan for three generations, it’s absurd to see them as foreigners. Clearly, this is about blood.”

While most ethnic Koreans have moved on, many still take measures to protect their families, and the Korean community’s political activism has helped all foreign residents in Japan. It has been mostly Koreans who went to court to protest discrimination, such as to end their mandatory fingerprinting in 1993. “As a result,” Lee adds with her ready laugh, “Japanese people often say, “Oh those Koreans are always making trouble.”

Asked what would surprise most people about Koreans, Lee debunks any notion of them as tragic victims.

“Koreans love to dance, they love to sing,” she says, her voice turning wistful. “If you actually know Koreans, you see how absurd the stereotype of the ‘Asian robot’ is. They love to laugh — they’re very affectionate. Maybe because of their history of oppression, when they feel you are part of their tribe, they are intensely loyal. I love that about Koreans!”