In 184, Zhang Jue, the leader of the Yellow Turban rebels, decided to revolt and planned to attack the capital Luoyang on March 5th. Zhang Jue wanted his faction inside the capital, notably the eunuchs in the imperial court Feng Xu and Xu Feng (徐奉), to start simultaneously, therefore he sent his subordinate Ma Yuanyi to secretly enter the palace. However, another subordinate Tang Zhou informed Zhang Jue's whole plan to other eunuchs, and Zhang Jue's plan became known to the world.
The Han government acted swiftly. Ma Yuanyi was arrested immediately by government officials, and was executed in the streets by the method of dismemberment.