In China , the Han dynasty ( 206 BC -- 220 AD ) advocated Confucianism as the `` de facto '' state religion , establishing tests based on Confucian texts as an entrance requirement into government service -- although , in fact , the `` Confucianism '' advocated by the Han emperors may be more properly termed a sort of Confucian Legalism or `` State Confucianism '' .
In China , the Han Dynasty ( 206 BC -- 220 AD ) advocated Confucianism as the de facto state religion , establishing tests based on Confucian texts as an entrance requirement into government service .