C.Y. Lee, a Chinese-born author whose best-selling 1957 novel “The Flower Drum Song” explored conflict among first- and second-generation immigrants in San Francisco’s Chinatown, provided the source material for two Broadway productions 43 years apart and sparked a cultural debate about Asian stereotypes, died Nov. 8 at his daughter’s home in Los Angeles. He was 102.

The cause was complications from kidney failure, said his daughter, Angela Lee. The family did not publicly announce the death at the time.

Over a career spanning seven decades, Mr. Lee wrote nearly a dozen volumes of historical fiction, but his best-known work was his debut novel, “The Flower Drum Song,” which brought instant literary stardom upon its release. He was called an overnight sensation, but in fact, he had spent years toiling in obscurity after having arrived in the United States from China on a student visa during World War II.

He wrote “The Flower Drum Song” while renting a room above a Filipino nightclub in San Francisco’s Chinatown and working as an editor and columnist for one of the city’s Chinese-language newspapers. The book concerned Wang Chi-yang, a first-generation Chinese immigrant struggling to accept the cultural and generational gap he had with his American-raised son, Wang Ta, particularly in matters of love and marriage.

Mr. Lee’s agent was turned down by nearly every major publisher in New York and was about to give up after a year, when Farrar, Straus and Cudahy made a bid. Mr. Lee said the book’s salvation came from an elderly man who had been paid by the publisher to screen manuscripts and had scrawled two words on the book before dying: “Read This.”

In a review for the New York Times, novelist Idwal Jones said Mr. Lee “writes with no omission of slang and sex and every regard for the popular taste.” The book shot up the bestseller list and caught the attention of screenwriter Joseph Fields, who persuaded the Broadway team of Richard Rodgers and Oscar Hammerstein II to adapt it for the stage. The three simplified Mr. Lee’s narrative, and the musical comedy “Flower Drum Song” enjoyed a two-year run on Broadway, starting in 1958. The musical, which Mr. Lee said was “funny and more commercial” than his book, was directed by Gene Kelly and received several Tony Award nominations. It was the first mainstream play about Asians featuring a mostly Asian cast.

Japanese American actress Miyoshi Umeki portrayed Mei Li, the “picture bride” intended for Wang Ta, in the Broadway musical and its 1961 movie adaptation. James Shigeta starred in the film as Wang Ta, who is beguiled by the seductive showgirl Linda Low, played by Nancy Kwan. It was the first major Hollywood film about Asian Americans featuring a predominately Asian cast and received five Oscar nominations.

As with the play, some critics viewed the film as an exotic stereotype of Chinese Americans that did not match the musical or dramatic standards of the Pacific Rim-set Rodgers and Hammerstein musicals “South Pacific” and “The King and I.”

In the New Yorker, critic Brendan Gill called the movie an “elaborate fraud,” bloated with “pseudo-Oriental intricacies . . . every bit as authentic as Fu Manchu.”

More than a half-century later, in an interview with literary scholar Andrew Shin, Mr. Lee said he wrote the book for a broad American audience in the hope of windfall success, and he defended the way he depicted Asian Americans.

“I have received criticism, you see, saying that even the novel is a little stereotypical,” he said. “But it was the period. I have written novels with characters who have bound feet and pigtails. But this is an accurate portrait of people during the period I was writing about. . . . So people who criticize the novel in that way forget about when the events take place. They just rush to say that I am stereotyping Chinese culture.”

Mr. Lee’s book fell out of critical favor and went out of print, in large part because it was so identified with the hit stage play and film.

In the late 1990s — after Mr. Lee had written several other Chinese-inspired novels that received little fanfare — there were stirrings of a revival of interest in the “Flower Drum Song” musical, championed by Asian American playwright David Henry Hwang, author of the Tony Award-winning drama “M. Butterfly.”

Hwang had long called the film version of Mr. Lee’s novel a guilty pleasure. “It was the only place on television where you could see Asians acting like Americans,” he told the San Francisco Chronicle, noting that he often watched it despite its reputation as dull, sexist and “inauthentic.” It also led him to the source material.

In 1996, Hwang received permission from the Rodgers and Hammerstein Organization to proceed with a “revisical.” He wrote a new libretto to better reflect the nuances of Mr. Lee’s work — which Hwang said for the first time in American popular culture portrayed Asian women as “complex, fully human characters.”

He tinkered with the conflict at the center of the plot: It would now hinge on whether to turn the father’s failing opera house into a nightclub.

The musical was a high-profile hit when it opened in 2001 in Los Angeles. The show moved the next year to Broadway, where it was nominated for several Tony Awards and ran for 169 performances.

Hwang was also central to the 2002 reissue of Mr. Lee’s novel by Penguin Books. In a foreword, Hwang said his introduction to the book was like “discovering a long-lost ancestor, a forgotten branch of my family tree, a missing piece of literary history for which I felt particular affinity.”

Chin Yang Lee was born Dec. 23, 1915, in Hunan province, the youngest of 11 children of a rice farmer. He moved with his family to Beijing at 10. Amid the Japanese occupation, he left school to flee for safety on China’s southern border with Burma, now known as Myanmar.

He spent a year and a half working as a secretary for a municipal chief — a self-proclaimed maharajah — in the border city of Mangshi. His job was to write English-language letters and entertain the chief’s bored wife.

“The maharajah needed somebody to play badminton with her every day,” Mr. Lee told the Chronicle. (The experience inspired his book “The Sawbwa and His Secretary: My Burmese Reminiscences,” published in 1959).

After Mr. Lee graduated from a university in Kunming, China, he said, his oldest brother — the de facto head of the siblings — ordered him to flee the war-torn country for his own good. “When my eldest brother told me, ‘Get out!’ I said, ‘Where to?’ ” he recalled to the Chronicle. “ ‘America,’ he said. I was surprised.”

He hocked all his possessions to pay for his passage to New York in 1943, and he never saw his parents again.

He briefly enrolled at Columbia University to study comparative literature, but his ambitions were to study playwriting at Yale’s graduate program with a professor who had once mentored Eugene O’Neill, whom Mr. Lee idolized. He received a master of fine arts degree in 1947 and was the only Asian in the drama school at the time, he said.

He won a short-story contest sponsored by Writer’s Digest magazine in 1949, applied for permanent residence in the United States and later gained citizenship. His wife of 34 years, Joyce Lackey, died in 1997. In addition to his daughter, survivors include a son, Jay Lee, both of Los Angeles.

After “The Flower Drum Song,” Mr. Lee published 10 other novels and a collection of short stories, many of which were translated into Chinese from English. They include “Lover’s Point” (1958), about a Japanese American woman’s love affairs in San Francisco, and “China Saga” (1987), a multigenerational family drama.

“China Saga,” critic Carolyn See wrote in The Washington Post, left readers “happily overdosed on rapes, double murders, banners, kites, concubines, daring rescues and — at one notable banquet — a fish made out of wood.” She also praised Mr. Lee’s “clean and literate” prose style.

In Hwang’s foreword to the 2002 reissue of “The Flower Drum Song,” he called the novel an “Asian American classic.” But Mr. Lee said in his interview with Shin, the literary scholar, “I never thought of it that way. I was just delighted if I could sell anything.”

CORRECTION: An earlier version of this obituary incorrectly said that the film version of “Flower Drum Song” featured a fully Asian-American cast. The cast was predominately Asian American.