There is no doubt that Sima Qian is a very knowledgeable person. When he wrote Historical Records, he referred to all the ancient books of the former Han Dynasty. Sima Qian also wrote in some articles in Historical Records that these things came from a book. In addition, Sima Qian's family has been a historian for generations, so Sima Qian was very familiar with some files at that time. Coupled with the experience of his youth, he has a profound understanding of the past history, which is why Sima Qian was able to write Historical Records.
The book Historical Records was written by Sima Qian according to his father's wishes. His father once wanted to write a history book that was unprecedented, but his father didn't have a chance to finish the book or died. Then Sima Qian revised and expanded some drafts left by his father and finally got the book Historical Records. But at this time, the historical records we saw were not the original manuscript of Sima Qian at that time, but we still saw many articles missing.
After the book Historical Records was written by Sima Qian, Sima Qian split it into two parts and hid it in the house and courtyard. During the reign of Xuan Di, although his grandson spread some of this book, his grandson was killed soon, so Historical Records was not completely spread. It was not until Han Yu and Liu Zongyuan launched the ancient prose movement in the Tang Dynasty, and the famous writers in the Song and Yuan Dynasties praised the writing style of Historical Records, which was completely spread among scholars.