The five-story pagoda located today inside the Ueno Zoological Garden was once part of the Kan’ei-ji Temple, built by the Tokugawa Shogunate to protect the Edo Castle against evil spirits.
The Temple and its adjacent buildings were once part of a big complex, occupying the hills surrounding the Shinobazu Lake at north and east and the area where today is located the JR Ueno station.
The Temple was destroyed in July 1868 during the Battle of Ueno, when the entire Ueno area was completely devastated:
Ueno after the Battle of Ueno
Just the five-story pagoda, the The Bell of Time and the Toshougu Shrine survived until today.