Ekei became a priest at the Tofukuji Temple, Kyoto, in his youth and later resided at the Ankokuji Temple in Aki Province (Hiroshima Prefecture). He learned, resourceful and fond of military arts, he was granted a purple robe (symbolizing the highest rank for priest). Terumoto Mori, a prominent warlord in western Honshu, enlisted his help in the administration of his territory. When Hideyoshi Toyotomi attacked Mori's Takamatsu Castle in 1582, Ekei acted as a mediator and advised Mori to compromise with Hideyoshi. Later Ekei served Hideyoshi and participated in the Sekigahara Battle between the Ishidas and Tokugawas in 1600. Defeated, he hid himself in the Gesshoin Temple, Kurama, in Kyoto but was captured and killed.