Su Watang, a modern Chinese medicine student, traveled through time and became the lowest medicine boy in the Da Chu Imperial Palace. He accidentally activated the merit system because he saved a dying palace concubine. The panel displayed "If you do one good deed every day, your merit can be redeemed in the medical code/spiritual plant/medicinal diet recipe." Relying on the system-rewarded "Fragments of a Thousand Gold Prescriptions" and "Royal Food Supplement", she rescued an old woman in the laundry department, a destitute concubine in the cold palace, and faced the terminally ill mad emperor Xiao Chenbi. From suspicion to dependence, the Mad Emperor gradually lets go of his guard. While favoring each other, the two uncover the truth about the "immortal emperor's fall into the devil". In the end, Su Watang cures the Mad Emperor with a perfect act of merit and virtue, and joins hands to break the old grudges between the past and the past, becoming the legend of the emperor and empress.