Li was born in a poor family in Zhili Province (roughly present-day Hebei) in 1848 during the reign of the Daoguang Emperor.
Due to only Li satisfying the West Empress Dowager, he was made the general head eunuch in the Forbidden City.
In 1869, An Dehai, the eunuch who served as Grand Supervisor (大總管), was executed by Ding Baozhen, the Provincial Governor of Shandong, for travelling out of the Forbidden City without permission.
Earlier in 1861, Li had helped Empress Dowager Cixi in seizing power from a group of eight regents in the Xinyou Coup, and hence earned her favor.
As such, after An Dehai's death, the Empress Dowager chose Li to be her new personal attendant and subsequently promoted him to the position of Grand Supervisor.
As Grand Supervisor and Empress Dowager Cixi's favorite attendant, Li held a highly influential position in the inner palace.
However, when his grave was raided in 1966 during the Cultural Revolution, the raiders discovered that it contained only his skull, and hence there were rumors that he was murdered (possibly decapitated).
The 2006 Chinese television series Princess Der Ling starred Wu Liping as Li.