Emperor Wen of Sui
It is not known when Li Anqi was born. He came from a line of famed officials, as his grandfather Li Delin served as a high-level official under Emperor Wen of Sui, and his father Li Baiyao served as an official of both Sui Dynasty and its successor Tang Dynasty. Li Baiyao also completed the "Book of Northern Qi", the official history of Northern Qi, the dynasty under which Li Delin started his career, which Li Delin started.