Yamaga Sokō (山鹿 素行, September 21, 1622 – October 23, 1685) was a Japanese philosopher and strategist during the Tokugawa shogunate. He was a Confucian, and applied Confucius's idea of the "superior man" to the samurai class of Japan. This became an important part of the samurai way of life and code of conduct known as bushido.
Yamaga Sokō had been studying the Chinese classics since the age of six and at nine years old became a student of Hayashi Razan, a follower of Neo-Confucianism who was responsible for its development as the official doctrine of the Tokugawa shogunate. At the age of forty, he broke away from the official doctrine and decided to change his conception of Confucianism, burning all of the books he had written while still under its influence. This, along with the publishing of a philosophical work entitled Seikyo Yoroku, caused him to be removed from the bureaucracy and exiled outside of Yedo (modern day Tokyo). Soon after being exiled, he moved to the Ako Domain, befriending Asano Nagatomo and becoming an important teacher of Confucianism & military science in the region. Yamaga's influence would later be expressed in the Genroku Akō incident, since the leader, Ōishi Yoshio, had been a devoted pupil under him.
Yamaga wrote a series of works dealing with "the warrior’s creed" (bukyō) and "the way of the gentleman" (shidō). In this way he described the lofty mission of the warrior class and its attendant obligations, which had become known as the "Way of the Samurai" (bushidō). According to William Scott Wilson, in his text "Ideals of the Samurai": "In his theory of Shido (a less radical theory than bushido), Sokō defined the warrior as an example of Confucian purity to the other classes of society, and as punisher of those who would stray from its path."
Wilson wrote that Sokō thought of the samurai as a "sort of Warrior-Sage" and focused his writings on the perfection of this "transcendent ideal". Wilson also states that "This direction of thinking, however, which was typical of the scholars of the Edo Period in its tendency toward speculation."
He remphasized that the peaceful arts, letters, and history were essential to the intellectual discipline of the samurai. Yamaga thus symbolizes the historical transformation of the samurai class from a purely military aristocracy to one of increasing political and intellectual leadership. One of his pupils was Daidōji Yūzan, a samurai from the Daidōji family, who would become the author of an important bushidō text, Budō shoshin shu. He also drew attention to the need to study and adopt Western weapons and tactics, as introduced by the Dutch.
In 1665, Yamaga publicly avowed his antipathy for Neo-Confucianism in the Essence of Confucianism and was arrested the following year at the instigation of Hoshina Masayuki, Lord of Aizu. Yamaga proclaimed his belief that the unadulterated truth could only be found in the ethical teachings of Confucius, and that subsequent developments within the Confucian tradition represented perversions of the original doctrine. Hoshina, however, saw this attack as a potential challenge to Tokugawa authority itself, and Yamaga was subsequently exiled to stay with the Asano daimyo in the Akō domain (han), where his life intersects with the tale of the forty-seven ronin, which is later retold in the classic of Japanese literature Chūshingura.
The life of his near contemporary Matsudaira Sadanobu presents a plausibly useful context for more fully understanding and appreciating Yamaga's life. Both men believed entirely in the civic and personal values of Confucianism, but both construed those precepts a little differently because of their places in Edo period society. In his own time, this conception of Confucian values was amongst the factors which led him to draw attention to the need to study and adopt Western weapons and tactics, as introduced by the Dutch.
Yamaga’s conception of bushidō restated and codified the writings of past centuries and pointed to the emperor as the focus of all loyalties. His teachings therefore had direct application for everyone in the existing feudal structure, and he was not calling for a change in the status of the emperor.
Japanese Patriotism and the Chucho Jijitsu 
An important theme running through Yamaga's life and works was a focus on the greatness of Japan, and this became one of the reasons his popularity and influence were to expand in the rising nationalistic culture of the mid-twentieth century.
Living at a time when very few texts were written in Japanese, and Japanese scholars devoted themselves to the study of Chinese history, literature, and philosophy, Sokō wrote the chucho Jijitsu (which translates as "Actual Facts about the Central Realm") to awaken Japanese scholars to the greatness of their own national history and culture. Sokō's argument is that Japan is the gift of the gods to the Japanese people, and that while many nations (here his readers would have understood him to refer to China) consider their country to be the center of the world, on the objective basis of temperate climate, only China and Japan can justify such claims, and of the two Japan is clearly superior because it is favored by the gods, as proven by the fact that only in Japan is there an unbroken Imperial line descended from the gods themselves.
The tone of the work can be appreciated in this excerpt:
"The water and soil of Japan excel those of all other countries, and the qualities of its people are supreme throughout the eight corners of the earth. For this reason, the boundless eternity of its gods and the endlessness of the reign of its sacred line, its splendid works of literature and glorious feats of arms, shall be as enduring as heaven and earth."
- Nussbaum, Louis Frédéric et al. (2005). "Yamaga Sokō" in Japan encyclopedia, p. 1038. at Google Books; n.b., Louis-Frédéric is pseudonym of Louis-Frédéric Nussbaum, see Deutsche Nationalbibliothek Authority File.
- De Bary, William et al. (2001). Sources Of Japanese Tradition: Volume 2, 1600 to 2000, p. 186.
- Trumbull, Stephen. (1996). The Samurai: A Military History. p. 265; Tucker, John. (2002). "Tokugawa Intellectual History and Prewar Ideology: The Case of Inoue Tetsujirō, Yamaga Sokō, and the Forty-Seven Rōnin," in Sino-Japanese Studies. Vo. 14 , pp. 35-70.
- Shuzo Uenaka. (1977). "Last Testament in Exile. Yamaga Sokō's Haisho Zampitsu", Monumenta Nipponica, 32:2, No. 2, pp. 125-152.
- Varley, Paul. (20000). Japanese Culture. p. 213.
- Earl, David Magarey, Emperor and Nation in Japan,; Political Thinkers of the Tokugawa Period, University of Washington Press, Seattle, 1964, pp. 45 ff.
- cited in Earl, David Magarey, Emperor and Nation in Japan,; Political Thinkers of the Tokugawa Period, University of Washington Press, Seattle, 1964, p. 46
- De Bary, William Theodore, Carol Gluck and Arthur E. Tiedemann . (2001). Sources Of Japanese Tradition: 1600 to 2000. New York: Columbia University Press. ISBN 0-231-12984-X
- Nussbaum, Louis Frédéric and Käthe Roth. (2005). Japan Encyclopedia. Cambridge: Harvard University Press. 10-ISBN 0-674-01753-6; 13-ISBN 978-0-674-01753-5; OCLC 48943301
- Shuzo Uenaka. (1977). "Last Testament in Exile. Yamaga Sokō's Haisho Zampitsu", Monumenta Nipponica, 32:2, No. 2, pp. 125–152.
- Trumbull, Stephen. (1977). The Samurai: A Military History. New York: Macmillan. 10-ISBN 0-02-620540-8; 13-ISBN 978-0-02-620540-5 (cloth) [reprinted by RoutledgeCurzon, London, 1996. 10-ISBN 1-873410-38-7; 13-ISBN 978-1-873410-38-7 (paper)]
- Tucker, John. (2002). "Tokugawa Intellectual History and Prewar Ideology: The Case of Inoue Tetsujirō, Yamaga Sokō, and the Forty-Seven Rōnin," in Sino-Japanese Studies. Vo. 14, pp. 35–70.
- Varley, H. Paul. (2000). Japanese Culture. Honolulu: University of Hawaii Press. ISBN 0-8248-2152-1
- Columbia University:Notes on the writings of Yamaga Sokō
- East Asian Institute, University of Cambridge: Further reading/bibliography