In 215, Zhang Lu submitted to Cao Cao, the ruler of the Wei Kingdom, surrendering his state in exchange for gaining state religion status for Tianshi Daoism. Zhang was given a title and land, as were several other family members and generals. His daughter was married to Cao Cao’s son, Cao Yu. His followers were forced to resettle in other parts of China, with one group being sent to the Chang'an area, and another being sent to Luoyang. Zhang relocated to the Han court until the Han Dynasty changed to the Wei. He then used his own popularity as a religious leader to lend legitimacy to the Wei, proclaiming that the Wei court had inherited divine authority from the Tao church, as well as from Confucian laws.
The collapse of the Wei Kingdom in 260 CE, along with the fall of Northern China to the Huns in 317, further scattered adherents to the Celestial Master. The Celestial Masters later reemerged in the 4th and 5th centuries as two distinct offshoots, the Northern and Southern Celestial Masters.
During the Yuan Dynasty, the Zhengyi Dao School of Daoism claimed lineage to the Celestial Masters. They became one of the two leading schools of Daoism in China, along with Quanzhen Dao. Zhengyi Daoists became common in the Jiangxi, Jiangsu, and Fujian provinces of China, as well as in Taiwan.
The Celestial Masters have survived into the 20th century. In 1949, after the communists gained power in the mainland, the remaining Celestial Masters fled to Taiwan, where they still live today.
Each of the three different eras of the Celestial Masters had distinct beliefs. However, because the Southern and Northern Celestial Masters both descended directly from the initial movement founded by Zhang Daoling, there are many beliefs that are shared. A number of texts exist that give insight into early Celestial Master practice, in particular the Taiping Jing and the Xiang'er commentary to the Laozi.
The foundation of Daoist belief is that there is an energy source known as qi that pervades all things. The human body also contains qi, but it only has a limited amount of qi. Qi could be lost from the body through things such as sweating and ejaculation. The Celestial Masters shared these foundational Daoist beliefs, but modified them slightly.
One such change was that illness was caused by sin. This was because sin caused qi to leave the body. In order to cure any illness, repentance was a crucial factor in ensuring that the loss of qi could be staunched. Repentance could be accomplished by spending time in a 'Chamber of Silence,' and reflecting on one's sins, or by beating one's breasts and kowtowing to heaven. Illness could also be cured in other ways as well, among them using medicinal herbs and by listening to ritual music. Eating very little was also of extreme importance, and an ideal diet would consist of no food at all, but only noncorporeal things such as air, which the person could absorb through meditation.
Sexual practices (known as heqi, or 'The Union of the Breaths') also differed significantly between Daojia (philosophical Daoism), and Celestial Master Daoism. In both traditions, semen is considered the embodiment of qi. If someone ejaculated too often, their life would be shortened. While Daojia advocates not ejaculating during sex in order to 'nourish the brain,' the Celestial Masters frowned upon this, and advocated non-ejaculation simply as a way to avoid losing qi. In addition, the Celestial Masters thought that the Daojia method of stealing a woman's qi to replenish the man's own qi was completely wrong, and should not be practiced.
The region governed by the Celestial Masters was divided into 24 regions for both administrative and religious reasons. Each of these 24 regions were connected with one of the Five Phases, one of the 24 periods of the year and with one of the 28 constellations of the zodiac. Depending on their birth signs, each adherent belonged to one of these districts. Each of the 24 regions was administered by 24 officials, who had under their command 240 armies of spirits, composed of 2400 generals, 2400 officers and 240000 soldiers. This system of administration reflected a utopian system of governance described in the Zhouli.
Administration and religion were closely linked in the system of the Celestial Masters. Adherents were grouped by families, and each was attached to a district. Families and districts held copies of civil registers, of which the gods also held a copy. The registers were detailed records of the people, and recorded each person's civil status, and identity. Any changes to these registered had to accompanied by a monetary contribution known as a 'wage of faith.' Requests to the gods followed a bureaucratic model, and were drawn up according to specific administrative codes. The effectiveness of these requests depended upon the accuracy of the registers kept by the gods.
New members of the sect were divided into groups led by instructors. The neohpytes were instructed by a catechism similar to that found in the Xiang'er that was likely a type of proto-meditation that later became widespread in movements such as the Shangqing School of Daoism. These instructors handled religious and administrative duties, receiving taxes, and set up road-side inns for travelers. Each of the faithful was assigned a rank in the religious hierarchy according to merit. The highest were given the rank of master (daoshi), and were presented with a register. The register allowed the master to command certain spirits.
One of the most important of the early Celestial Master texts is the Xiang'er commentary to the Laozi. This text gives insight into the Celestial Masters’ physiological beliefs, meditation practices and rituals. In addition, the commentary reinterprets the Laozi to have all humanity as its intended audience, instead of only a sage.
A later text written in 255 CE, known as the Commands and Admonitions for the Families of the Great Dao was composed to a divided Celestial Master community after the dispersal of the Sichuan population. While written in the persona of Zhang Lu, it is probable that this text was not written by him, as he had likely died by 255 CE.
The Celestial Masters were the first group of organized Daoists. Before their foundation, Daoism did not exist as an organized religion. Being the first organized religious Daoists, the Celestial Masters are the ancestors of subsequent Daoist movements such as the Shangqing and Lingbao movements.