The two largest divisions of Zen in Japan are Rinzai and Soto. They are based on differences that were well-established, although not institutionally separated, in China. Rinzai (Chinese, Linji) claimed as its founder the Chinese monk Mazu, and Soto (Chinese, Caodong) claimed Shitou. Rinzai came to be known as the "sudden" school, and Soto, the "gradual" school, in reference to their approaches to attaining enlightenment.
The distinction between these approaches became marked, not at the time of Mazu and Shitou, but with Hongzhi (1091-1157) and Dahui in the late 12th century. Hongzhi taught that enlightenment came, not from a verbal answer to the "problem" of the gongan (koan), but from a state of quiet stillness and contemplation. Dahui felt that, although enlightenment could occur in this way, the method could also lead to stagnation. Thus, he created a method called contemplating the "critical phrase" (huatou) of a gongan. According to textual accounts, Dahui honed this technique while teaching a nun named Miaodao. Giving her a phrase to contemplate, he refused all rational explanations and solutions, forcing her toward a flash of insight.
Both Japanese and western accounts have largely neglected the founder of the first organized Zen sect in Japan, which was called the Daruma school. This school was popular in the 12th century, and was considered a rival by the other schools. It was notable for rejecting all the precepts and practices of Buddhism. The founder, Nonin (d. 1196?), was proclaimed an illegitimate representative of Zen as he had never gone to China to study. Even after he sent two of his senior students to China, one of whom obtained a dharma robe and certification of succession from a Chinese master, critics remained. Conflicts between the Daruma school and other groups continued, and eventually Nonin's contribution was erased from the annals of Zen.
In 1194, the establishment of independent Zen monasteries was banned, partly due to Nonin's activities, and partly due to those of Eisai. Eisai (1141-1215) was a Tendai monk who, while known as the founder of Rinzai Buddhism in Japan, continued to consider himself a member of the Tendai sect. Born into a family of priests, he took the vows of a novice at Enryakuji Tendai monastery in Kyoto when he was 14. When he was 28, seeing a need for reform of the Tendai tradition due partly to monastic involvement in political and military ventures, he traveled to China and returned with a number of Tendai texts. On a second trip to China, almost two decades later, he met and studied with a Chan master, and received dharma transmission from him in 1191.
Returning to Japan, Eisai began to promote Zen and established several small monasteries where Zen practice was combined with the study of the Lotus Sutra, about which he had lectured for many years. Criticized for his support of Zen, he wrote a defense that included four major points: 1) Zen was the essence of Buddhism; 2) Zen had been accepted as a part of Tendai for a long time; 3) Zen was based on disciplined application of the precepts; and 4) support of Zen would revitalize Buddhism. In 1199, Eisai moved to eastern Japan where he gained the support of powerful nobles in the Kamakura shogunate. For the remainder of his life, he continued to promote Zen practice and study in combination with Tendai and esoteric Buddhist practices.
These events occurred against a background of political turmoil. The Heian period of Japanese history ended in 1185 with the destruction of the ancient capital at Nara. Monasteries in Nara were destroyed as well, as many monks had been actively engaged in the war. In 1192, the Kamakura Shogun became the de facto ruler of Japan. Eisai's relationship with the Kamakura nobility was advantageous for Zen.
Dogen (1200-1253), born just after these conflicts concluded, also became a monk at an early age. He studied Tendai and esoteric Buddhism, and also studied Zen under one of Eisai's successors. In 1223 he accompanied his teacher, Myozen, to China. When Myozen died there two years later, Dogen became a student of the abbot of a major Chan monastery. In 1227, he became the heir of that lineage and returned to Japan where he established a new Zen community outside of Kyoto. There he opened Koshoji, which was the first Zen monastery in Japan to have a Chan-style meditation hall. Dogen preached enlightenment for all who practiced sitting meditation, including women and laypersons. Later, however, he would state that enlightenment was only possible for male monks.