Taoism's origins may be traced to prehistoric Chinese religions in China; to the composition of the ''Tao Te Ching'' ; or to the activity of Zhang Daoling . Alternatively, one could argue that Taoism as a religious identity only arose later, by way of contrast with the newly-arrived religion of Buddhism, or with the fourth-century codification of the Shangqing and Lingbao texts.
Other accounts credit Laozi as the teacher of both Buddha and Confucius. In some sects of religious Taoism, Laozi had thirteen incarnations, including the Three August Ones and Five Emperors, up until his last as Laozi who lived over 800 years. They correlate early Taoism with ancient picture writing, which they associate with mysticism and ancestor worship.
In the early Han Dynasty, the Tao came to be associated with or conflated with the . A major text from the Huang-Lao movement would be the ''Huainanzi'', which interprets earlier Taoist teachings in light of the quest for immortality. Zhang Daoling claimed to have begun receiving new revelations from Laozi and went on to found the sect as the "First Celestial Master". He performed spiritual healing, and collected dues of five pecks of rice from his followers . Zhang Daoling's major message was that the world-order would soon come to an end, and be succeeded by an era of "Great Peace" .Their activities did hasten the downfall of the Han Dynasty, largely because Zhang's grandson set up a theocratic state into what is now Sichuan province. The same could be said of their contemporaries and fellow Taoists, the Yellow Turban sect. Laozi received imperial recognition as a divinity in the mid second century CE. The Yin and Yang and theories date from this time, but were not yet integrated into Taoism.
The name ''Daojia'' comes from the Han Dynasty. In Sima Qian's history it refers to immortals; in Liu Xiang it refers to Laozi and Zhuangzi. ''Daojiao'' came to be applied to the religious movements mentioned above. The two terms were used interchangeably until modern times. The earliest commentary on the ''Dao De Jing'' is that of Heshang Gong , a legendary figure depicted as a teacher to the Han emperor.
Three Kingdoms Period
During the Three Kingdoms Period, the Xuanxue school, including Wang Bi, focused on the texts of Laozi and Zhuangzi. Many of the school's members, including Wang Bi himself, were not religious in any sense. Wang Bi mostly focused on reconciling Confucian thought with Taoist thought. Because the version of the Tao Te Ching that has been passed on to the present is the one that Wang Bi commented upon, his interpretations became very influential as they were passed on alongside the Tao Te Ching. In addition, his commentary was compatible with Confucian ideas and Buddhist ideas that later entered China. This compatibility ensured Taoism would remain an important aspect of Chinese culture, and made the merging of the three religions easier in later periods, such as the Tang dynasty.
Taoist alchemist Ge Hong, also known as Baopuzi was active in the third and fourth centuries and had great influence on later Taoism. Major scriptures were produced during this time period, including The Shangqing and scriptures received at Maoshan. The Shangqing revelations were received by Yang Xi, a relative of Ge Hong's; the revelations emphasised meditative visualisation . They spoke of the Shangqing heaven, which stood above what had been previously considered the highest heaven by Celestial Master Taoists. Yang Xi's revelations consisted of visitations from the residents of this heaven many of whom were ancestors of a circle of aristocrats from southern China. These Zhen Ren spoke of an apocalypse which was to arrive in 384, and claimed that only certain people from this aristocratic circle had been chosen to be saved. For the first century of its existence, Shangqing Taoism was isolated to this aristocratic circle. However, Tao Hongjing codified and wrote commentaries on Yang Xi's writings and allowed for the creation of Shangqing Taoism as a popular religion. The Lingbao scriptures added some Buddhist elements such as an emphasis on universal salvation.
Also during the Six Dynasties period, the Celestial Master movement re-emerged in two distinct forms. The Northern Celestial Masters were founded in 424 century by Kou Qianzhi, and a Taoist theocracy was established that lasted until 450 CE. After this time, the Northern Celestial Masters were expelled from the Wei court and re-established themselves at Louguan where they survived into the Tang Dynasty. The Southern Celestial Masters were centered at Jiankang (modern-day Nanjing, and were likely made of those adherents who fled Sichuan and others who fled from Luoyang after its fall in 311 CE. These various followers of The Way of the Celestial Master coalesced to form a distinct form of Taoism known as the Southern Celestial Masters, who lasted as a distinct movement into the fifth century.
Taoism gained official status in China during the Tang Dynasty, whose emperors claimed Laozi as their relative. However, it was forced to compete with Confucianism and Buddhism, its major rivals, for patronage and rank. Emperor , who ruled at the height of the Tang, wrote commentaries on texts from all three of these traditions, which exemplifies the fact that in many people's lives they were not mutually exclusive. This marks the beginning of a long-lived tendency within imperial China, in which the government supported all three movements. The added the ''Tao Te Ching'' to the list of classics to be studied for the imperial examinations.
Several Song emperors, most notably , were active in promoting Taoism, collecting Taoist texts and publishing editions of the ''Daozang.''
The Quanzhen school of Taoism was founded during this period, and together with the resurgent Celestial Masters called the is one of the two schools of Taoism that have survived to the present.
The Song Dynasty saw an increasingly complex interaction between the elite traditions of organised Taoism as practised by ordained Taoist ministers and the local traditions of folk religion as practised by spirit mediums and a new class of non-ordained ritual experts known as ''fashi''. This interaction manifested itself in the integration of 'converted' local deities into the bureaucratically organised Taoist pantheon and the emergence of new exorcistic rituals, including the Celestial Heart Rites and the Thunder Rites.
Aspects of Confucianism, Taoism, and Buddhism were consciously synthesised in the Neo-Confucian school, which eventually became Imperial orthodoxy for state bureaucratic purposes.
While Taoism suffered a significant setback in 1281 when all copies of the ''Daozang'' were ordered burned, this holocaust gave Taoism a chance to renew itself. ''Neidan'', a form of internal alchemy, became a major emphasis of the Quanzhen sect, whose practitioners followed a monastic model inspired by Buddhism. One of its leaders, Qiu Chuji became a teacher of Genghis Khan before the establishment of the Yuan Dynasty. . Originally from Shanxi and Shandong, the sect established its main center in Beijing's . Before the end of the dynasty, the Celestial Masters sect again gained preeminence.
In 1406, emperor Zhu Di commanded that all Taoist texts be collected and combined into a new version of the ''Daozang.'' The text was finally finished in 1447, and took nearly forty years to complete.
The ruin of the Ming Dynasty and the subsequent establishment of the Qing Dynasty by the Manchus was blamed by some literati on religion, specifically Taoism. They sought to regain power by advocating a return to orthodoxy in a movement called ''Hanxue'', or 'National Studies.' This movement returned the Confucian classics to favor and completely rejected Taoism. During the eighteenth century, the imperial library was constituted, but excluded virtually all Taoist books. By the beginning of the twentieth century, Taoism had fallen so much from favor that only one complete copy of the ''Daozang'' still remained, at the White Cloud Monastery in Beijing.
Guomindang leaders embraced science, modernity, and Western culture, including Christianity. Viewing the popular religion as reactionary and parasitic, they confiscated some temples for public buildings, and otherwise attempted to control traditional religious activity.
People's Republic of China
The Communist Party of China, officially atheistic, initially suppressed Taoism along with other religions. During the Cultural Revolution from 1966 to 1976, many Taoist temples and sites were damaged and Monks and priests were sent to labor camps.
Persecution of Taoists stopped in 1979, and many Taoists began reviving their traditions. Subsequently, many of the more scenic temples and have been repaired and reopened.
Taoism is one of five religions recognised by the PRC, which insists on controlling its activities through a state bureaucracy . Sensitive areas include the relationship of the Taoists with their sect's lineage-holder, who lives in Taiwan, and various traditional temple activities such as astrology and shamanism, which have been criticised as "superstitious".
Taoism in the Occident
In the 1927-1944 the chief propounder of Taoism for the Western World was Prof. Henri Maspero in Paris.
Michael Saso was the first occidental to be initiated as Taoist priest; he subsequently served also as co-editor of ''TAOIST RESOURCES'', the only English-language academic journal to be devoted entirely to Taoism.
Today, many Taoist organizations have been established in the Occident.