Laozi's biography is based on legend, but the biographies of most significant religious figures, especially the "founders of the great religious traditions," are often embellished with mythical elements. The difference in the case of Laozi is that many contemporary historians, in both the West and the East, believe that as an historical figure Laozi never existed at all.
The first record of a biography of Laozi is found in the Shiji, or Records of the Historian, by Sima Qian, written around 100 B.C.E. Within this biography are two stories, one of which is mentioned in earlier texts, and the other which appears for the first time in the Records. The first story is that Laozi was an archivist for the state of Zhou and that Confucius consulted with him on ritual matters. Laozi's response was a critique of Confucius's teachings. According to the Records, Confucius later said to his disciples that Laozi was like a dragon whose abilities were beyond his understanding.
The second story is one that, while first appearing in Sima Qian's biography, is almost certainly a somewhat older legend. According to the account, Laozi, believing that the state of Zhou was in decline, decided to leave China. At the western pass, the gatekeeper insisted that before he left, he should record his teachings for posterity. The Taode jing was the result.
Sima Qian also recorded the legend that Laozi lived between 160 and 200 years, due to his self-cultivation and longevity practices. With time, the legend of Laozi would take on more and more supernatural elements, some clearly under the influence of Buddhism. Some legends claimed Laozi became the Buddha after leaving China, or that he was the Buddha's teacher. A 2nd-century C.E. inscription located at a shrine at Laozi's purported birthplace described him as of the same age as the primordial chaos from which all existence emerged. It also said that he had effected 81 transformations in form until he reached a human incarnation. Thereafter he became an advisor and teacher to centuries of rulers, and a savior to all of humankind.
One long-enduring and popular legend of Laozi is that his virginal mother conceived him through the radiance of the Pole Star (a central symbol of Taoism). She carried him for 81 years, although he would leave her body each night to study the Tao, and finally she gave birth to him through her left armpit, leaning against a plum tree. (These elements were probably borrowed from Buddhism, as the Buddha was said to have been born from his mother's right armpit, as she clung to a branch of a sala tree.) Laozi was born an old man with white hair and beard (hence his name, Laozi, one translation of which is "Old Child"). When his mother saw him, she was so frightened that she died. Having no mother or father, he took the family name Li, or plum.
One 2nd-century C.E. text is representative of a large body of sacred literature about Laozi that would emerge over the centuries. Here Laozi is portrayed as, again, existing before the universe was created, and also as the source of the Tao and the sovereign lord of the spirit realm. In a portion of the text purported to be his own words, he promises to return and overthrown the unfair government of the Han dynasty. This motif would be repeated by a number of messianic cults in subsequent centuries.
It was to Laozi that Zhang Taoling, the founder of the first enduring Taoist religious group (the Way of the Celestial Master tradition) attributed his spiritual revelations, which began around 142 C.E. Laozi appeared to Zhang in visions, and was said to have awarded him the title of Celestial Master — the deified Laozi's representative on earth. Laozi told Zhang that the end of the world was coming, and that he must instruct his followers to repent their sins and purify themselves in preparation to be the "seed people" for a new age. Unlike other messianic cults from that time period, followers of Way of the Celestial Masters did not expect an incarnation of Laozi to return to earth, but they did regard him as Lord Lao the Most High, transmitter of sacred talismans, registers, and new scriptures.
Many scholars regard Zhang Taoling as the true founder of Taoism. Unfortunately, historical information about Zhang Taoling is scarce. He was said to have written several books, but these are now lost. He was also said to have established a theocracy in the region of present-day Sichuan, with himself as the head of state. By legend Zhang is known as a fangshi and alchemist, a master of longevity techniques who was able to vanquish demons and prepare the elixir that conferred immortality.