The Imperial Library (, Teikoku Toshokan) of the Empire of Japan was established in 1872. Prior to World War II, it was the only national library in Japan. It is one of the predecessors of the current National Diet Library.
The Imperial Library of Japan was established as the Shojaku-kan () under the jurisdiction of the Ministry of Education on September 3, 1872. The library was housed within the Yushima Seid? and combined the functions of both a library and a museum, and inherited the surviving documents held by the Tokugawa shogunate prior to the Meiji Restoration. This collection evolved into the Tokyo Shojakukan () in 1875, which was made a deposit library for all publications in Japan and was renamed the Tokyo Prefectural Library in 1877 and the Tokyo Library in 1880. It was relocated to Ueno in 1885.
Its first director was Tanaka Inagi (?).
In 1890, then director Tanaka Inagi visited the Library of Congress in the United States and major national libraries in Europe with the aim of creating a similar facility in Japan. As a result, in April 1897, the Tokyo Library was renamed the Imperial Library, and began to assume the functions of a national library.
A new building to house the Imperial Library was completed on March 20, 1906 in Ueno Park. At the time of the transfer, the collection contained approximately 470,000 volumes. This grew to over 1 million volumes by the end of World War II. However, from the start, the library was plagued by the lack of adequate budgets, and by lack of space to accommodate all volumes necessary. The collection escaped major damage in the 1923 Great Kant? earthquake, and was evacuated to the countryside during World War II and thus escaped destruction in the Tokyo air raids.
As of 31 March 1908, it held 244,483 books, of which 194,500 were Japanese and Chinese books.
Following the end of World War II, the Imperial Library was renamed the National Library in December 1947, and was again renamed the National Diet Library in 1948. The former building of the Imperial Library of Japan now houses the International Library of Children's Literature.