The first shogun to rule Japan was Minamoto no Yoritomo, who established the Kamakura shogunate in 1192.