XIXINAN VILLAGE, China — Pan Zhiyi was just 16 when he got his first, tantalizing glimpse ofChina’s bawdiest classic, a Ming Dynasty novel banned for 400 years by emperors and Communist commissars alike. He found a copy in a pile of “counterrevolutionary” texts confiscated for pulping by Maoist zealots.

“I had no idea what it was,” Pan recalled. He couldn’t make much sense of the book’s literary language or its flowery accounts of libidinous gymnastics. (Its main character dies from an overdose of aphrodisiacs.) Yet, Pan said, the chance discovery “must have been fate.”

Now 60, the self-taught scholar and sometime businessman spends much of his time poring over “Jin Ping Mei,” a novel known in English as “The Plum in the Golden Vase.” Claiming to have solved one of China’s most enduring literary riddles — who wrote the book? — and also to have found a way to boost the economy here in Anhui province, Pan has come to a conclusion that has appalled his wife and shocked his neighbors: This sleepy farming village and the torrid tales in “Jin Ping Mei” are intimately entwined.

Local officials, torn between avarice and alarm, have flip-flopped on whether to shun Pan’s findings or to try to cash in on his claims that the fictional account of moral decay in imperial China is rooted in real-life events in Xixinan.

Promoting ties to celebrated classic texts such as “The Analects of Confucius” or the Tang Dynasty poetry of Du Fu has long been a good way to make money in China: Tourists flock to literary shrines. Marketing “Jin Ping Mei,” however, has so far brought Xixinan more trouble than profit, as well as competition from two villages in Shandong province that make rival claims on the book.

The wrangling over a novel first published in 1608 reflects a tension that bedevils China’s sprint to modernity: a struggle between the temptations of an anything-goes economy and the diktats of a Communist Party that, though gnawed by graft, still trumpets itself as a guardian of morality.

More problems than profit

Written by an unknown author, or possibly authors, in the late 16th century, “Jin Ping Mei” is widely regarded by scholars as a literary triumph and as an indictment, rather than a celebration, of immorality. But so graphic are its descriptions of debauchery that a 1939 English translation rendered big chunks of the text into Latin to avoid causing offense.

Communist leader Mao Zedong, like his imperial predecessors, proscribed the novel. (He read it eagerly himself.) It is still banned for the general public in mainland China, though expurgated versions are available and scores of academics now study the full text. It’s sold in Hong Kong — sealed in cellophane with an obscenity warning.

What makes the novel so sensitive, however, is not just sex, explained Pan, who has set up a one-man research center in his living room, crammed with “Jin Ping Mei”-themed books, paintings and knickknacks. “The ruling class censored the book not because it was pornographic but because the author revealed their corruption and exposed their ugly faces to the sunlight,” Pan said. “The corruption today is worse than what is described in the book.”

Officials paid little attention when Pan first started obsessing over “Jin Ping Mei.” But they got interested when he began publishing articles claiming that the novel’s protagonist, a corrupt merchant destroyed by his own vices, was based on a salt trader and indefatigable womanizer who lived in Xixinan in the 16th century.

Spotting a chance to make money, a government-linked tourism outfit struck a quiet deal with authorities here to develop a “Jin Ping Mei” Ruins Park in the grounds of a derelict imperial-era mansion that Pan claimed was the setting for much of the novel.

Shortly before the park was set to open, China’s official Xinhua News Agency denounced the project as immoral, describing Pan’s claims as “mere commercial speculation.” The park opened anyway but then quickly shut down.

A year later, in May 2007, it opened again. A local newspaper reported “explosive” success, but media elsewhere reacted with horror. After less than a year in business, the park suffered a fatal blow: Its financial sponsor got hit by a corruption probe and went bankrupt.

The park, a collection of crumbling buildings around a fetid pond, is now closed to the public and overgrown with weeds. Pan, who is still allowed to visit, is hoping another investor will come forward to revive the scandal-plagued scheme.

Security officials keep an eye on Pan, warn him to mind his tongue and trail outsiders who visit the village.

‘We are very traditional’

Ma Wansheng, an earnest young Communist Party boss who parachuted into Xixinan with instructions to restore wholesome order, said the village wants to attract tourists but wants nothing to do with “Jin Ping Mei.” Sitting beneath a big red flag in the local government office, he said authorities had backed the ruins park only because they didn’t realize it involved the banned novel.

“As soon as we found out, we stopped it,” he said.

Who actually wrote “Jin Ping Mei” and what, if any, real location inspired the novel has been debated by scholars for centuries. Pan believes the author was Wang Daokun, a Ming Dynasty writer and official who lived in these parts. The book, he argues, uses dialect and describes household items that are found only in and around Xixinan.

But Xixinan residents are fed up with the ruckus. Some like the idea of a tourist boom but are queasy about embracing “Jin Ping Mei.”

“This is not something to be proud of,” said Wu Yong, who traces his lineage back to Wu Tianxing, a 16th-century salt merchant whom Pan believes was the model for the novel’s debauched protagonist. “We are very traditional here,” Wu added.

Pan’s fiercest critic, though, is probably his wife, 63-year-old Li Qixiu. “I totally oppose what he’s doing,” she said over lunch in the family home, off a crooked alley lined with Ming Dynasty houses. “Whenever we get money, he spends it on this stupid book. It’s a complete waste.”