Ministry of Rites
In 1566, he served in the Ministry of Rites in Beijing, where he became learned in Yangmingism as well as Buddhist thought. He was then assigned as a prefect in Yunnan in 1577, but left his post three years later. After this, he took up a teaching post in Hubei on the invitation of Geng Dingli, but was attacked as a heretic by Dingli's brother, the scholar and official Geng Dingxiang, and eventually moved to Macheng. In 1588, he took the tonsure and became a Buddhist monk, but did not follow the ascetic lifestyle of other monks. Two years later, his work A Book to Hide was printed.