The protagonist Xiao Yi was killed by a traitor at the beginning and was imprisoned. In a desperate situation, he activated the "event selection causal system". He made use of the decision-making analysis and prediction of potential outcomes provided by the system to advance step by step in the officialdom, from a lowly official to an important minister in the court. With his extraordinary wisdom and philanthropy, he quelled civil strife, resisted foreign enemies, promoted benevolent government, and eliminated corruption. Finally, he established a peaceful and prosperous era, became a wise prime minister, and was admired by all people.