Some time after the Zenzaiya incident 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 Yamanami 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.