Shen Zhiyi, daughter of the capital's chief judicial investigator and well versed in criminal law, becomes a despised palace servant after her family is framed. When a palace maid dies under bizarre circumstances, her keen powers of observation help her seize a chance to survive, and she is forced into a master-servant pact with the unpredictable prince Zhao Heng. Together, they untangle one mysterious case after another amid the treacherous depths of the imperial palace and court. Each case is like a butterfly flapping its wings, ultimately leading them toward a vast conspiracy that will bring down the dynasty.