Sima Qian's father Sima Tan served in the Han Dynasty government between the periods Jianyuan (140BC-135BC) and Yuanfeng (110BC-105BC), where he held the office of the Prefect of the Grand Scribes, (Taishiling, also translated as "Great Historian"). Among his duties were the supervision of sacrifices and calendars, the investigation of astrological questions and the care of the Imperial Library. He also collected historical records and thereby laid the foundation for the work of his son.Sima Qian was born in 145 or 135BC at Longmen near present-day Hancheng, where he grew up in a rural environment. At the age of 10, he was already well versed in old writings and at 20 he set out on a major journey through the empire. He visited the reputed graves of the ancient sage kings Yu and Shun and studied in the home province of Confucius in Shandong. Upon his return, he served as a palace attendant. In 110BC, he was sent westward on a military expedition against some 'barbarian' tribes.

In 110BC, Sima Tan fell ill and could not attend the imperialsacrifical ceremony. Thinking he was about to die, he summonedhis son to carry on the family tradition and to complete thework he had begun.

Upon his father's death, Sima Qian inherited his office and took on an ambitious project started by his father - production of the first full history of China, the Shiji (historical records). This broad ranging work extended over 130 chapters in not in historical sequence but divided into particular subjects, including annals, chronicles, treatises - on music, ceremonies, calendars, religion, economics - and extended biographies. In this way, the Shiji, or Records of the Historian, covers the period from the five sages of prehistoric times, through the Xia, Shang, Zhou, and Qin dynasties to the Han Dynasty of Sima Qian's own time. The Zhou Dynasty, probably founded just before 1000BC, represents the beginning of the historic period and has provided archeological evidence that confirms some of Sima Qian's history.

Sima Qian made the political mistake of seeking to intercede for a general who had lost a battle when faced by overwhelming forces. This offended the Han Emperor Wu, who sentenced Sima Qian to castration. Such a sentence was calculated to cause an honorable suicide. Sima Qian, however accepted the punishment and consequent disgrace in order to finish the Shiji, as he explained in a letter to a friend. We are indebted to Sima Qian for most of the history we have of early China and for his demonstration that some things are more important than personal honor.