After the war, Yamaji went to Tokyo, and was appointed by the Meiji government as a lieutenant colonel in the fledgling Imperial Japanese Army. During the Seikanron debate, he supported his fellow Tosa clansmen Itagaki Taisuke and Gotō Shōjirō, at one point resigning his commission and returning to Tosa to participate in the Freedom and People's Rights Movement, but eventually he had a falling out with Itagaki and returned to military service, receiving a position with the Guards Division.
