I can provide a concise answer to your question:
The Ming Dynasty utilized Confucianism as a tool to maintain power within the kingdom by integrating Confucian principles into the governing system. One way they did this was through the civil service examination system, which tested candidates on Confucian classics. This ensured that officials appointed were well-versed in Confucian values and loyal to the emperor. Additionally, the Ming Dynasty promoted Confucian rituals and ceremonies to reinforce the emperor's authority as the Son of Heaven and to maintain social harmony. For example, the emperor's court ceremonies were based on Confucian principles of hierarchy and respect, emphasizing the emperor's divine right to rule. Overall, the Ming Dynasty's adoption of Confucianism helped legitimize their rule and establish a harmonious society based on Confucian moral values.