A visit by Confucius to Tancheng had been kept alive in local memory. A temple and shrines marked the locations where Confucius was said to have been. The episode is described in the ancient Tso-chuan commentary on the Spring and Autumn Annals, a classic text of China. It apparently tells of the journey by Confucius circa 524 B.C. from his home in Lu to the then state of T'an, to consult and study with the Viscount of T'an, also called T'an-tzu.
Tancheng in the 17th century is the setting for Jonathan Spence's microhistory, The Death of Woman Wang. Spence draws on two Tancheng sources: the Local History of T'an-ch'eng, edited by Feng K'o-st'an; and, "a personal memoir and handbook on the office of magistrate compiled in the 1690s by the scholar-official Huang Liu-hung". Spence also employed the 'strange stories', the sad tales and essays of author P'u Sung-ling, "who lived a little to the north in Tzu-ch'uan county, separated from T'an-ch'eng by a range of bandit-infested hills". Feng K'o-st'an arrived in Tancheng from Fukien in 1668 as the new magistrate. A few months later the Great Tancheng earthquake of 1668 with strength M8½, the largest seismic event ever recorded in history in eastern China, hit the county. Although Feng was a "chin-shih", an 'advanced scholar', his experiences in Tancheng were not fortunate, being dismissed from office in 1670. His Local History recorded Tancheng "suffering for fifty years" from the 1622 White Lotus uprisings, and from drought, locusts, famine, sickness, and assorted banditry. People hurt, and despaired. In 1643 "Manchu troops under General Abatai" invaded Tancheng and "killed tens of thousands". The Ming dynasty collapsed in 1644. Huang Liu-hung arrived from Honan in 1670 as the next magistrate; also a scholar, it was his first posting. The people of Tancheng told him that the region had for many years been "destitute and ravaged". He found the people struggling for bare survival. They were also "unusually superstitious". It was very difficult to raise moral. The social fabric had begun to fray. To counter the "decades of catastrophes", Huang attempted to grant generous "tax concessions" and "corvée labor rebates", but adequate approval by the Peking government was not forthcoming.