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 三皇 - 伏羲, 神农, 黄帝; Five Emperors 五帝 - 少昊, 颛顼, 帝喾, 尧, 舜. 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: '从盘古开天地,三皇五帝到于今...'