After Army service in World War II brought him to China, a young South Carolina native and labor activist named Sidney Rittenberg stayed on to help build a new world power forged by a communist revolution.

Mr. Rittenberg, who was 98 when he died Aug. 24 at a nursing center in Fountain Hills, Ariz., became one of a handful of Americans who lived behind the lines of a country that developed into a bitter Cold War enemy. He was widely considered one of the most powerful Westerners advising the Chinese government in the 1950s and ’60s, but he paid a steep price for his front-row vantage point. Mr. Rittenberg was twice imprisoned and spent 16 years in solitary confinement, swept up in the fickle tyranny and convulsive whims of his friend Mao Zedong.

On the surface, he was an unlikely radical, the scion of a politically prominent Charleston family. But his scorn for Jim Crow laws and authority shaped his temperament as he became a union organizer and Communist Party member in the American South.

'I'm now part of history'

In China, he saw poverty and suffering on a mass scale. A chance encounter in 1946 with Mao, founder of Communist China, sealed his ambition to stay on.

“I walked in the door and there he was,” Mr. Rittenberg later recalled. “It was like a picture right out of history, and underneath that was the feeling, ‘I’m now part of history.’ ”

Easygoing and charismatic, even in his second language, Mr. Rittenberg developed a rapport with Mao and Zhou Enlai, the Chinese Communist Party’s second-in-command. They discussed life in America, played cards and watched the English-language films of Stan Laurel and Oliver Hardy, two of Mao’s favorite comedians, as Mr. Rittenberg provided the translation.

After Mao’s seizure of power in 1949 over the corrupt U.S.-backed Nationalist Party, which enjoyed little support among the population, Mr. Rittenberg was rewarded with appointments at Chinese news and propaganda agencies. His positions and his connections did not save him from falling victim to periodic crackdowns inflicted en masse as Mao solidified his personality cult.

Mr. Rittenberg seemingly took it in stride.

A stalwart supporter of the regime, he believed that a little violence was inevitable in a revolution, even one ostensibly devoted to peace and equality. “A revolution is not like inviting guests to dinner,” he said in “The Revolutionary,” a 2012 documentary about his life, paraphrasing Mao. “It can’t be that civilized, that courteous, that gracious, that gentle.”

The communist leader’s death in 1976, followed by a thaw in relations with the United States, accelerated Mr. Rittenberg’s release from jail for a second time. He was feted as a celebrity in China and was a figure of enduring mystery, fascination and repulsion back home, seen by many as a naive and all-too-willing participant in some of the Communist regime’s gravest excesses.

For the remainder of his working life, he became an unofficial ambassador between China and the United States, a “translator of cultures” fluent in the habits and thinking of the East and the West, said journalist Amanda Bennett, who co-wrote his memoir, “The Man Who Stayed Behind” (1993).

“He is one of the few people who understands why China went through what it did,” added Bennett, one of the Wall Street Journal’s first correspondents in China and current director of Voice of America. “He was a zealot,” she said, but he eventually “was able to step out of himself and look at what had happened and what was wrong with what he believed.”

'There isn't any justice'

Sidney Rittenberg Jr. was born in Charleston on Aug. 14, 1921, to a Jewish family steeped in politics. His paternal grandfather emigrated from Lithuania and served five terms in the state House of Representatives. Mr. Rittenberg’s father was president of the Charleston City Council.

He attributed his activist leanings to having witnessed police officers brutalizing a black man who had been seeking protection from a drunken and abusive white man. “I asked my aunt about it,” he told People magazine. “I told her, ‘It’s so unjust!’ She said, ‘There isn’t any justice. You get what you pay for.’ ”

He briefly attended the University of North Carolina at Chapel Hill but left to become a labor organizer. His first wife, Violet, a farmer’s daughter, divorced him soon after he was conscripted into the Army in 1942 and sent overseas.

In an Army language training program, he was said to have a brilliant aptitude for languages and Chinese in particular. In 1945, he landed in Kunming to help the Nationalist government with civil administration duties. He was appalled by the corruption and dissolute attitude toward the people, both by U.S. and Nationalist troops.

In what he later called a turning point in his decision to remain in China, he investigated the death of a rickshaw driver’s daughter, killed by an Army sergeant who had been driving drunk.

The Army compensated the woman’s father with $26 — far less than the $150 it had paid for accidentally killing another man’s horse. Even more horrifying, he said, was the man giving back $6 for what he assumed was the expected kickback.

After his military discharge, he worked in Shanghai for a United Nations relief agency but was appalled by the black marketeering of flour and other necessities meant to help suffering peasants. He soon found his way to the Communists’ mountain redoubt at Yan’an, where he met Mao.

Foreigners — among them the American-born writer Anna Louise Strong and the American-born physicist Joan Hinton — “were kept around as kind of ornaments,” said Orville Schell, a China scholar at the nonprofit Asia Society in New York City. “That showed the Chinese communist movement had an internationalist element.”

Known as Li Dunbai, the phonetic expression of “Rittenberg” in Chinese, Mr. Rittenberg was given a position at the party’s official press agency. But just as quickly, his friendship with Strong, who had fallen out of favor with leaders in Moscow who held sway over Beijing at the time, led to his own arrest in 1949 as one of her “spies.”

That led to a six-year term in prison, which Mr. Rittenberg justified as a test of his political loyalty. His second wife, Wei Lin, left him.

Upon his release, he said, Mao and Zhou personally expressed their regrets to him. He was given an apartment with hot water — among other luxuries — and began advancing in the ranks of the government’s propaganda arm.

His support was unwavering throughout the Great Leap Forward, a 1958-1962 campaign of forced agricultural collectivization and industrialization that resulted in mass famine, and the subsequent Cultural Revolution, a terrifying witch hunt designed to reinforce Mao’s primacy.

He praised Maoist thought at massive rallies, readily joined in publicly shaming many of his friends and colleagues, wrote scathing self-criticism and volunteered to perform physical labor to demonstrate his loyalty to the state and revolution.

In their book “The Wind Will Not Subside: Years in Revolutionary China, 1964-1969,” scholars Nancy and David Milton described Mr. Rittenberg, invariably wearing a brown corduroy suit and disheveled tie, as “a man with an undefined mystique of power bestowed by the Chinese” and who was highly sought after by the entire foreign community in Beijing “for information, expertise and wisdom.”

Disillusionment and return

By early 1968, he was targeted again as a Western spy, and he attributed his arrest to Mao’s scheming wife, Jiang Qing. It took all his power not to fall into despair as his third wife, Wang Yulin, endured three years in a labor camp and their children were ostracized.

Mr. Rittenberg was released in 1977 soon after Jiang and others in her faction, called the Gang of Four, fell from grace and were put on trial. The American was, once again, set up in a comfortable apartment in Beijing.

But he was tired and largely disillusioned. In prison, he had devised a Confucian-style saying to apply to his own fate: “Man who climbs out on limb should listen carefully for sound of saw.”

He had retained his U.S. citizenship all those years and returned to the United States in 1979 with his wife and their children. His family in South Carolina had long written him off as dead.

Adapting to the new, business-friendly era, Mr. Rittenberg developed a role as a high-priced fixer who could help American executives glad-hand Chinese officials and sign new business deals in the country. He served as an indispensable middleman to companies such as Prudential Financial, American International Group, Intel and Microsoft.

His death was confirmed in a statement from his family, who did not give a precise cause. In addition to his wife, survivors include four children, Jenny, Toni, Sunny and Sidney Jr.; and five grandchildren.

Mr. Rittenberg would come to regard Mao as “a great hero and a great criminal all rolled into one.” And the course of his own life epitomized the same ambivalent legacy.

“I think that I chose the road I did,” he wrote in his memoir, “and stuck to it as long as I did because, like so many others I came to know, I genuinely believed it was the only way I could help change the miserable lives of people.”