The National Diet Library is the successor of three separate libraries: the library of the House of Peers, the library of the House of Representatives, both of which were established at the creation of Japan's Imperial Diet in 1890; and the Imperial Library, which had been established in 1872 under the jurisdiction of the Ministry of Education.
The Diet's power in prewar Japan was limited, and its need for information was "correspondingly small". The original Diet libraries "never developed either the collections or the services which might have made them vital adjuncts of genuinely responsible legislative activity". Until Japan's defeat, moreover, the executive had controlled all political documents, depriving the people and the Diet of access to vital information. The U.S. occupation forces under General Douglas MacArthur deemed reform of the Diet library system to be an important part of the democratization of Japan after its defeat in World War II.
In 1946, each house of the Diet formed its own National Diet Library Standing Committee.
Hani Gorō, a Marxist historian who had been imprisoned during the war for thought crimes and had been elected to the House of Councillors (the successor to the abolished House of Peers) after the war, spearheaded the reform efforts. Hani envisioned the new body as "both a 'citadel of popular sovereignty'", and the means of realizing a "peaceful revolution". The Occupation officers responsible for overseeing library reforms reported that, although the Occupation was a catalyst for change, local initiative pre-existed the Occupation, and the successful reforms were due to dedicated Japanese like Hani.
The National Diet Library opened in June 1948 in the present-day State Guest-House (former Akasaka Detached Palace) with an initial collection of 100,000 volumes. The first Librarian of the Diet Library was the politician Tokujirō Kanamori. The philosopher Masakazu Nakai served as the first Vice Librarian. In 1949, the NDL merged with the National Library (previously called the Imperial Library) and became the only national library in Japan. At this time the collection gained an additional million volumes previously housed in the former National Library in Ueno.
In 1961, the NDL opened at its present location in Nagatachō, adjacent to the National Diet. In 1986, the NDL's Annex was completed to accommodate a combined total of 12 million books and periodicals. The Kansai-kan (the Kansai Library), which opened in October 2002 in the Kansai Science City (Seika Town, Sōraku County, Kyoto Prefecture), has a collection of 6 million items. In May 2002, the NDL opened a new branch, the International Library of Children's Literature, in the former building of the Imperial Library in Ueno. This branch contains some 400,000 items of children's literature from around the world.
Though the NDL's original mandate was to be a research library for the National Diet, the general public is the largest consumer of the library's services. In the fiscal year ending March 2004, for example, the library reported more than 250,000 reference inquiries; in contrast, it recorded only 32,000 requests for research from the National Diet.