The first person to be given the title of shogun (using that term in its “modern” sense) in Japan was a man named Minamoto Yoritomo. Minamoto (this is his family name) lived from 1147 to 1199. He was given the title of shogun in 1192.
The title of shogun is actually short for “seii taishogun.” This means something like “great general who subdues barbarians.” The title was originally givne to people who led expeditions against the Ainu in Hokkaido. Starting with Minamoto Yoritomo, however, it was shortened to simply “shogun” and was used to refer to the supreme military commander of all of Japan.
Yoritomo was the first of these shoguns and he became the originator of what is called the Kamakura shogunate, which lasted until 1333.