Yokoi was a samurai born in Kumamoto, Higo Province, and a distant descendant of Hōjō Takatoki. Yokoi married Yajima Tsuseko and had two children with her, Miyako and Tokio. He was sent by the domain to Edo in 1839 for studies, and developed contacts with pro-reform members of the Mito domain. After his return to Kumamoto, he started a group to promote the reform of domain administration along Neo-Confucianism lines, opening a domain school called Shōnan-do. In 1857, he was invited by the daimyō of Echizen, Matsudaira Yoshinaga to become his political advisor. While in Fukui, Yokoi wrote "Kokuze Sanron". One of the topics covered in Yokoi’s treatise was on state religion, in which Yokoi commented that although Japan had Buddhism, Shinto, and Confucianism, it lacked a true national religion in the manner of western nations, and that this lack was a weakness in the Japanese kokutai, which placed Japan at a disadvantage to the western powers. This concept provided one rationale underpinning the formation of State Shinto in the later Meiji period Empire of Japan. In the same treatise, he also stressed the importance of a strong navy for the defense of Japan. He has been labelled "pro-Western" by contemporary historians, but was nevertheless harshly critical of Christianity as both false and heretical compared to Japanese Buddhism. In 1862, Matsudaira was unexpectedly made acting prime minister of the Tokugawa administration in a move calculated to obtain imperial approval for the Shōgun's actions in signing unequal treaties with the western powers in 1858, ending the nationalseclusion policy which was supported by the Imperial Court, and Yokoi accompanied him to Edo. Yokoi called for a complete reform of the Tokugawa government, including reconciliation between the Shogunate and the Imperial Court. He also called for the complete opening of Japan to foreign trade, economic reform, and establishment of a modern military along western lines. After reading Chinese scholar and reformer Wei Yuan's Illustrated Treatise on the Maritime Kingdoms, Yokoi became convinced that Japan should embark on a "cautious, gradual and realistic opening of its borders to the Western world" and thereby avoid the mistake China had made in engaging in the First Opium War. He also called for a national assembly of the major domains, with the Shōgun evolving into something that resembled a prime minister. Outraged and astounded by these radical ideas, conservatives within the government quickly stripped Yokoi of his posts, and even his samurai status, and placed him under house arrest in Kumamoto. However, while in exile, Yokoi continued to maintain contact with Katsu Kaishū and other reform-minded members of government. After the Meiji Restoration, Yokoi was freed by the new Meiji government, and honored with the title of san'yo. However, Yokoi was assassinated in 1869 by conservative samurai who suspected him of being a Christian, and of harboring secret republican sentiments.