The idea of learning from the past is fundamental to Confucian thinking, and the early histories and biographies are the closest thing to sacred narratives in Confucianism. Among the "classics" are many stories that contain a moral component or exemplify an effort to understand why things happened as they did.
Kongzi (better known as "Confucius" in the West) sought inspiration from the historical, poetic, and ritual texts of the Western Zhou dynasty (1045-771 B.C.E.), founded nearly five hundred years before his birth. Among these are the Shujing (Classic of Documents), which tells the story of the dynasty's rise and fall. The early years of the dynasty were plagued by civil war.
At the heart of this conflict was the matter of royal succession. The brother and chief minister of the dynastic founder, the Duke of Zhou, argued that Tian (Heaven, the high god worshipped by the Zhou kings) had bestowed its blessing on all of the Western Zhou people, especially the king's ministers, rather than on the royal lineage alone. Other factions at court, however, countered that the king alone was the recipient of divine authority. Unsurprisingly, this argument prevailed with Zhou kings. Yet the Duke of Zhou's view that Tian's mandate (Tianming) is gained and maintained by merit rather than blood eventually became very influential on Kongzi and his followers much later. Confucians would come to see the Western Zhou's collapse in 771 B.C.E. as an act of Tian that signaled the loss of the heavenly mandate to rule. The story of the Western Zhou's beginnings, however, convinced Confucians that just as virtuous rulers once came to power and brought prosperity and harmony, so too could sage kings walk the earth again in their own time and order society with tradition, ritual, and virtue.
Another key Western Zhou text for Kongzi and his disciples was the Shijing (Classic of Poetry). Kongzi believedthat the poems found in this ancient collection reinforced his basic view of humans as inheritors of great moral traditions and partners with Tianin the moral transformation of society. The Shijing consists mostly of folk songs about love and work, although its later portions include lyrics originally sung as part of Zhou religious ceremonies. The former often depict lonesome maidens pining for their lovers or beleaguered peasants laboring for unappreciative landlords, while the latter describe cultural heroes such as Hou Ji, a minister of the mythical sage-emperor Yao who later was deified as the god of agriculture, and Tang, the virtuous king who overthrew the corrupt, semi-legendary Xia dynasty (2700-1600 B.C.E.?) and founded the Shang dynasty (1700-1027 B.C.E.). Later Confucian commentators often interpreted the Shijing's folk songs as moral allegories, whereby "lonesome maidens" and "lovers" became virtuous officials wishing to serve a sage-ruler.
Kongzi himself left no writings. Collections of aphorisms and anecdotes related to Kongzi, such as the Lunyu (Analects), were assembled by Kongzi's disciples after his death. Neither the Lunyu nor other texts related to early Confucian thinkers were as important to Kongzi's followers as the Wujing ("Five Classics" of Western Zhou origin), which traditionally are attributed to Kongzi as writer or editor. It was these works of early Chinese literature that became the first canonical writings of the Confucian tradition in the 2nd century B.C.E.
The Wujing did not attain their final form until Confucianism was adopted as the Han dynasty's official ideology and its most cherished texts became the basis of the civil service examination system that dominated official education in China for more than two thousand years. In addition to the aforementioned Shujing and Shijing, they include the Yijing (Classic of Changes), the Liji (Record of Rituals), and the Chunqiu (Spring and Autumn Annals).
For early Confucians, the Yijing -- which originally was a manual of divination used by the Western Zhou court -- confirmed their view that human beings and the universe exist in a harmonious unity, which then allows events in one sphere (e.g., the natural world) to influence events in another sphere (e.g., human affairs), and thus allow for the prediction of such events. The Liji describes court rituals and other ceremonies that Confucians sought to rediscover and reenact as a way of restoring society to its lapsed virtue.