This matter would have to be traced back as far as the Three Sovereigns and Five Emperors.
Tips
history
First attested in 《周礼·春官·外史》: 掌三皇五帝之书 'in charge of the books of the Three Sovereigns and Five Emperors.' Traditional rosters: Three Sovereigns 三皇 — 伏羲 (Fúxī), 神农 (Shénnóng), 黄帝 (Huángdì); Five Emperors 五帝 — 少昊 (Shàohào), 颛顼 (Zhuānxū), 帝喾 (Dìkù), 尧 (Yáo), 舜 (Shùn). Lists varied between sources.
usage
Used both literally (the legendary period) and figuratively as a synonym for 'long, long ago' — like English 'time immemorial.' Mao famously used it in 论反对日本帝国主义的策略 to dwarf the scale of the Long March: '从盘古开天地,三皇五帝到于今...'