Yui was born in
Tosa Domain (present-day
Kōchi Prefecture) in what is now part of the city of
Kōchi, where is father was a samurai in the service of the
Yamauchi clan. He graduated from the 5th class of the
Imperial Japanese Army Academy in 1882 and 7th class of the
Army Staff College in 1891 and was assigned to staff positions within the
Imperial General Headquarters upon graduation. After serving as a staff officer in the
IJA Second Army during the
First Sino-Japanese War, he was sent as a
military attaché to the
United Kingdom from 1895 to 1899, and returned to serve on the staff of the
IJA 5th Division during the
Boxer Rebellion. Yui developed a reputation as a competent officer, and as a colonel at the start of the
Russo-Japanese War, served as Vice Chief of Staff under General
Yasukata Oku of the Japanese Second Army. Towards the end of the war, he distinguished himself at the
Battle of Mukden as Chief of Staff of the
IJA 8th Division. After promotion to
major general in 1907, Yui continued to serve under General Oku as chief of the
Imperial Japanese Army General Staff's Operations Section, until his promotion to
lieutenant general and promotion to commandant of the
Army Staff College in 1914, remaining in this post through most of Japan's involvement during
World War I. He was subsequently named commander of the
IJA 15th Division and the
Guards Division before becoming Chief of Staff of the
Siberian Expeditionary Army in 1918. In April 1919. he dispatched Major General Yasutaro Takayanagi on a secret mission to survey
Outer Mongolia as part of Japan's plans to encourage Mongolian separatism and to eventually detach that region from Chinese hegemony. In November 1919, Yui become a full
general and was in command of the Japanese garrison at
Tsingtao from 1919 until 1922. Resigning from active duty in 1923, he was promoted to the honorific title of Junior Second
Court Rank. He entered the reserves and died two years later in 1925. His grave is at the Sōmei Cemetery in Tokyo. ==Decorations==