Ninna-ji was founded in the early Heian period. In 886, Emperor Kōkō ordered the construction of the Nishiyama Goganji Temple to bless the nation and propagate Buddhist teachings, but he did not live to see its completion. Emperor Uda saw the construction to its completion in 888 and named it "Ninna" after the regnal year of the late Emperor Kōkō's reign. From 888 to 1869 it was traditional for reigning Emperors to send a son to the temple to take over as head priest when a vacancy arose.
After retiring from his throne, Emperor Uda became the first Monzeki, or aristocratic priest, of Ninna-ji. From then on until the end of the Edo period, the temple saw a succession of head priests of imperial lineage.
In 1467, the temple was destroyed by fire and fighting in the Ōnin War. It was rebuilt roughly 150 year later, thanks to the eldest son of Emperor Go-Yōzei, Kakushin Hosshinnō, who enlisted the help of Tokugawa Iemitsu, the third shogun of the Tokugawa shogunate. The resurrection coincided with the rebuilding of the Imperial Palace in Kyoto and thus received imperial funding.
The tradition of having aristocratic or persons of imperial lineage serve as chief of the temple ended with the 30th Monzeki, Junnin Hosshinnō in the late Edo period.
Most of the surviving buildings date from the 17th century, and include a five-story pagoda and an orchard of dwarf cherry trees. The temple itself features some beautifully painted screen walls, and a beautiful walled garden.