In 1860, after Yamanami was defeated by Kondō Isami in a match, he was enrolled at the Tennen Rishin-ryū's Shieikan dojo in Edo (which was run by Kondō from 1861.) Yamanami was particularly educated in literary and military arts, with a gentle personality and a kind heart. He was very much admired by the Head Instructor (Jukutou) at the Shieikan, Okita Sōjirō (the later Okita Sōji), who called him a big brother. In 1863, Yamanami, Kondo and other members of the Shieikan joined the Roshigumi, the military unit being sent to Kyoto by the Tokugawa Shogunate.
In Kyoto, Kondō and his "faction" stayed in Kyoto while the rest of the Roshigumi returned to Edo. Soon, the Mibu Roshigumi (which would eventually become known as the Shinsengumi) was formed. Yamanami served as a vice-commander, alongside Hijikata Toshizō after Niimi Nishiki was demoted for instigating a vicious street brawl with sumo wrestlers in Kyoto.
Yamanami was said to be one of the Shieikan members involved in the Serizawa Kamo assassination in 1863. After the purge of the Serizawa faction, Yamanami became one of two vice-commanders (the other being Hijikata).
Yamanami did not take part in the famed Ikedaya Jiken in 1864, instead he guarded the group's headquarters.
Some time after the Ikedaya Jiken he tried to escape the Shinsengumi, despite the regulation against deserters. As a result, he committed seppuku with Okita as his Kaishakunin on March 20 (lunar calendar February 23), 1865. There are several speculations on Yamanami's reason to escape, including a theory that Yamanami committed suicide without ever leaving the Shinsengumi. Another theory is Sannan lost hope about Shogunate's future and was delusional about Tokugawa Yoshinobu political decisions, but when forced to choose between his friends and Justice, he decided to commit an honorable suicide and escape scandal.
In Shinsengumi : the Shogun's Last Samurai Corps by Romulus Hillsborough there is something mentioned about Yamanami's escape. The following is quoted from this book:
The trouble with Yamanami seems to have originated over a disagreement in philosophy, though Shimosawa also cites a bitter rivalry with the other vice commander, Hijikata Toshizo. Yamanami was apparently vexed over the lately inflated self-importance of Kondo and Hijikata. He felt that they had forgotten the original purpose for which the members of the Shieikan had enlisted in the "loyal and patriotic" corps. The unyielding will to power that had lately consumed his erstwhile friends had diminished their former patriotic ideals. According to most sources, Yamanami's vexation was exacerbated sometime early in 1865, when Kondo and Hijikata, unhappy with their cramped headquarters at Mibu, decided to move to a more spacious location at Nishihonganji Temple in the southwest of the city. The temple priests were perplexed over the decision. Their attempts to rebuff the Shinsengumi were ignored by Kondo and Hijikata. Yamanami objected to what he considered coercion of Buddhist priests. "Certainly there are many other suitable places, " he admonished Kondo, and suggested that his commander reconsider. But his commander would not reconsider, and Yamanami resolved to pay the ultimate price. He composed a farewell letter explaining the reasons he could no longer, in good conscience, risk his life under Kondo's command. Then he defected.
In short, this is the most accepted theory in regard of Yamanami's reason to leave the Shinsengumi, even though officially it is still a mystery. In addition, Hillsborough's source in regard of the rivalry between Yamanami and Hijikata, Shimosawa Kan's Shinsengumi Shimatsuki, is in fact categorized as historical fiction.
Yamanami fled to Otsu while Kondo sent Okita to retrieve him. After Yamanami returned to Mibu, he was ordered to commit seppuku. He asked Okita to serve as his Kaishakunin. There is also a theory that Kondo asked Okita to serve as Yamanami's Kaishakunin out of respect for Yamanami. (The Kaishakunin was usually a closest friend or family member whenever possible.) Yamanami saw Okita as family and the two shared a strong bond till the very end of Yamanami's life.
Yamanami was buried at the Kōen Temple (光縁寺 Kōenji?) in Kyoto.
Before his death, Yamanami was the second-in-command of the Shinsengumi. (It is a misconception that Hijikata had always been the second-in-command. In fact, Hijikata became the second-in-command after Yamanami's death.)
- Shinsengumi Master's Bible. Shin Jinbutsu Oraisha, 2003.
- Shinsengumi Encyclopedia. Shin Jinbutsu Oraisha, 1978.
- Yamamura, Tatsuya. Shinsengumi Kenkyaku-Den. Tokyo: PHP Interface, 1998. ISBN
- Japanese Wikipedia article on Yamanami Keisuke.