According to one account, the door to the treasure house opened by chance. In June 1900, when Wang Yuanlu 王圓籙 was cleaning Cave 16 of the Mogao Caves, he noticed a fissure in the wall along a corridor. He knocked on the wall and realized that it had to be hollow inside. He slowly tore down the wall, little by little, and found another small cave with a floor space of some 13 square meters.
In which numerous scriptures and old documents were piled up to the ceiling. The small cave was later named the Library Cave 蔵経堂 or Cave 17.