sat for the metropolitan-level examination again and obtained a jinshi () position at the young age of 24, and was admitted to the Hanlin Academy as a shujishi (). At the same time, he also continued taking classes under Zeng Guofan to improve his knowledge. Three years later, he took the sanguan () examination in the academy and earned the position of a bianxiu (; an editor). Suppressing the Taiping Rebellion In January 1851, the God Worshipping Society led by Hong Xiuquan started the Taiping Rebellion in Guangxi Province. Within about two years, the rebels had conquered many territories in southern China and established the Taiping Heavenly Kingdom with Nanjing as their capital. In 1853, the rebels, advancing from Wuhan, captured Anqing and killed Jiang Wenqing (), the xunfu of Anhui Province. The Xianfeng Emperor commissioned Lü Xianji (), the Left Vice Secretary of Works, to travel to Anhui Province and recruit civilians to form militias to counter the rebels. Lü Xianji knew that Li was familiar with the local situation in Anhui Province so he secured permission from the imperial court to bring Li along with him as an adviser and assistant. Li was later ordered to remain in Anhui to oversee the militia. In late 1853, the Taiping rebels defeated imperial forces and captured Shucheng County; Lü Xianji committed suicide. In the following year, Jiang Zhongyuan (), the xunfu of Anhui Province, committed suicide after Lu Prefecture fell to the rebels. Li then became a subordinate of Fuji (), the new xunfu, who ordered him to lead troops to attack the rebels, with Li often leading them in person. Li recaptured two counties and Lu Prefecture from the rebels within the following year. For his achievements, he earned the appointment of a daotai (道台; circuit administrator) and the privilege of wearing a single-eyed peacock feather in his hat. Later, he led troops into the Huai River area, but could not get along with his subordinates and was forced to abandon his mission. In the winter of 1858, Li was reassigned to serve in Zeng Guofan's office, where he was in charge of drafting documents. Li led a carefree life, flouted rules and regulations, and often woke up late. Zeng Guofan once chided him, "Shaoquan, now that you're working in my office, I only have this piece of advice for you: 'Commitment' is the only thing that matters to