According to his autobiography, Hanshan Deqing entered a monastic school in Nanjing's Bao'en temple at the age of twelve. While there he studied literature as well as religious subjects and began writing poetry when he was 17. Two years later he was ordained as a Chan monk under the Buddhist name of Cheng Yin. When the monastery burned down in 1566, he busied himself for some years in keeping the community together and raising money for repairs. Then in 1571 he set out as a religious wanderer, going from monastery to monastery in search of instruction and growing in meditative attainment. After four years he settled on Mount Wutai but by 1583 he had become famous as a Buddhist Master and set out travelling to remote areas again. It was at this time that he prefixed his name with that of Hanshan Peak so as to return to anonymity.