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 . 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 '' .