Many elements of Shang dynasty religion found their way into Taoism. Shang dynasty religion was based on the worship of a heavenly bureaucracy of ancestors, headed by Shangdi, the heavenly counterpart of the earthly emperor. Sacrifices were made regularly to these ancestors, who were believed to be able to influence events on earth. Occasionally humans were sacrificed, typically prisoners of war, but most often it was animals that were ritually killed. Ritual meals were served that amounted to banquets on behalf of the ancestors. A young boy, usually the grandson of the highest ranking deceased family member, would occupy the seat reserved for that individual and was believed to be a channel for his spirit.
Divination rituals were also regularly practiced as a means of communicating with the ancestors. Their advice would be sought on matters of political marriages, war, and the interpretation of signs and portents by means of questions recorded on animal bones or tortoise shells to which extreme heat would be applied. The resulting cracks were "read" and interpreted by court officials who, like shamans, were able to communicate with the spirit world.
After death, an individual sought to advance to the divine bureaucracy. Documents addressed to the heavenly bureaucrats would be buried with the deceased, outlining their achievements and abilities, sometimes even taking the form of a letter of recommendation for a particular position. The degree of influence that an ancestor might have in the afterlife, and thus on the lives of his descendants, was determined by amount of de, or charismatic power, that he had accumulated during his life. One's de could be also enhanced after death through rituals conducted by his descendants.
The ancient Chinese nobility did not develop elaborate ideas about the afterlife, perhaps because the focus remained on the world of the living, despite the fact that it was believed to be controlled in many ways by the dead. Some texts mention the "Yellow Springs," an underground realm where deceased persons could be found. That the afterlife was conceived of in terms of life on earth is suggested by the contents of tombs built for the rulers and important members of the nobility. These included everything they might need in the afterlife, including clothing, household objects, chariots and horses, entertainers, personal attendants, and more. As time passed, people of lower status also adopted this practice. Those who could not afford real objects were buried with pottery replicas of houses, livestock, and the like.
Some scholars argue that later Taoist rituals of death are based on these rites, replacing a poorly defined and this-worldly view of the afterlife with an opportunity for salvation and transportation to heavenly realms after death. Others argue that the Taoist rituals are simply an adaptation of these earlier death rituals, but made available to all rather than only to the nobility. It is certain, regardless, that opposition to the practice of bloody sacrifice was a fundamental tenet of Taoist religion. Instead of animals, the Taoists sacrificed words. Passages of scripture, prescriptions, or talismanic writings were burned to transmit requests to heavenly officials.
Shang influence is also evident in the bureaucratic structure of the Taoist pantheon, and in the notion of rank and lineage in the afterlife that is so important to the Taoist tradition. In the Way of the Celestial Masters, the earliest Taoist "church," the founder took on the role of the focal person on earth, and his counterpart in heaven was Laozi, now regarded as a Celestial Master. There was an elaborate pantheon of deities, like the heavenly bureaucrats of the Shang, and these deities were also believed to be able to influence life on earth. A register was created that indicated the place of the deceased among these officials. Living Taoist adepts, when initiated, also took their place in this pantheon.
Buddhism was also of great importance in the development of Taoism. Some in China already practiced meditation, physical exercises, and other forms of self-cultivation before Buddhism was introduced, and Taoist philosophical thought held some ideas that were similar to elements of Buddhist thought; thus there was from the beginning a receptive audience for Buddhism. Chinese Buddhism was shaped by these common interests and similarities, and Buddhism, in turn, shaped developments in Taoism.
With time, Buddhist scholars sought to correct misunderstandings and misinterpretations of Buddhist texts, and they were careful to distinguish between Buddhism and native Chinese religious thought. At the same time Buddhism began to absorb elements of Taoism, and Taoists began to shape their tradition so that it was more like Buddhism, with temple buildings and monasteries, statues of Taoist deities, a canon of scriptures, and the like.