The Yongle Encyclopedia (jQngl@) or Yongle Dadian () is a largely-lost Chinese leishu encyclopedia commissioned by the Yongle Emperor of the Ming dynasty in 1403 and completed by 1408. It comprised 22,937 manuscript rolls or chapters, in 11,095 volumes. Fewer than 400 volumes survive today, comprising about 800 chapters (rolls), or 3.5 percent of the original work.
Most of it was lost in the 2nd half of the 19th century, in the midst of events as Second Opium War, the Boxer Rebellion and subsequent social unrest. Its sheer scope and size made it the world's largest general encyclopedia until it was surpassed by Wikipedia in late 2007, nearly six centuries later.
Although known for his military achievements, the Yongle Emperor was an intellectual who enjoyed reading. His love for research led him to develop the idea of categorizing literary works into a reference encyclopedia to preserve rare books and simplify research. Instrumental to this undertaking was Emperor Yongle's own changes to the function of the Hanlin Academy.
Prior to his reign, the Hanlin Academy was responsible for various clerical tasks such as drafting proclamations and edicts. Emperor Yongle decided to elevate the status of the Hanlin Academy and began selecting only the highest-ranking recruits for the academy. Clerical duties were relegated to Imperial officers, whereas the Hanlin Academy, now full of elite scholars, began to work on literary projects for the Emperor.
The Yongle Dadian was commissioned by the Yongle Emperor (r. 1402–1424) and completed in 1408. In 1404, a year after the work was commissioned, a team of 100 scholars, mostly from the Hanlin Academy, completed a manuscript called A Complete Work of Literature. Emperor Yongle rejected this work and insisted on adding other volumes.
In 1405, under Emperor Yongle's command, the number of scholars rose to 2,169. Scholars were sent all over China to find books and expand the encyclopedia. Emperor Yongle assigned his personal advisor, Dao Yan, a monk, and Liu Jichi, the deputy minister of punishment, as co-editors of the encyclopedia, supporting Yao Guangxiao.