“Many of today’s zainichi are fourth-generation, so they’re hardly immigrants anymore. They are essentially Japanese,” Professor Ukiba added. Outright discrimination has faded, he said, since the period depicted in “Pachinko” — the 1910s through the 1980s — but has not disappeared. Some bigotry has moved online, where trolls depict zainichi as “cockroaches” or fifth-columnists for nuclear-armed North Korea.

Ms. Lee spent nearly two decades conceiving, writing and rewriting “Pachinko.” The seed was planted in 1989, when, as a student at Yale, she attended a talk by a Protestant missionary who had spent time among the zainichi. Until then, she said, she had never heard of this branch of the Korean diaspora. Growing up in the United States, she was used to Koreans being viewed as hardworking and upwardly mobile, a model American minority. But many zainichi, she was surprised to discover, languished at the bottom rungs of Japan’s socioeconomic ladder.

“My level of research became a little neurotic,” she said. Although she was a Korean immigrant herself, she was entering a completely new world.

For ethnic Koreans in Japan, one route to economic improvement has been pachinko, a pastime derived from pinball. Played by millions of Japanese at noisy, smoke-filled halls, many of which are operated by zainichi, pachinko occupies a legal and social gray zone. The game itself is legal, but the gambling that inevitably accompanies it is not.

“Instead of banning it, Japan tolerates it but disparages the people who run it,” said Ms. Lee. She sees a parallel with Koreans’ place in Japanese society: deeply established, yet not fully accepted as legitimate members.

Ms. Lee’s family embodied the rosier American version of the Korean immigrant story.

In South Korea, her father had worked in marketing at a cosmetics company, but fears that the Korean Peninsula could erupt into another devastating war convinced him to leave. After arriving in New York in the mid-1970s, her parents operated a news kiosk in Manhattan, at Broadway and 31st Street. They soon upgraded to a wholesale costume-jewelry business, working and saving their way into the middle class and sending their three daughters to college.

“Pachinko” is a product of persistence. Ms. Lee discarded an earlier, more narrowly focused version of the novel, which she wrote in the late 1990s and early 2000s. Its original main character was Solomon Baek, an aspiring ethnic Korean investment banker who is subjected to bigotry and betrayal at a financial firm in Tokyo.