Japan has had 123 emperors in its history.
According to the Chronicle of Japan, the first emperor lived in 550 B.C.
Of course there is no evidence to prove it or not. It says he is the descendant of the sun goddess.
Since then, all the emperors have had the same blood line. Japanese Imperial Family has the oldest history in the world.
In ancient times, there were times when emperors ruled Japan.
But for the most part, they were generally regarded as the existence of adoration.
Later power moved from emperors to aristocrats, then to samurai.
Unlike emperors and kings of other countries, Japanese emperors didn't have military power.
In the 9th century, rebellions occurred in remote areas away from the capital.
In order to put down them, Emperor Kanmu sent Sakanoue No Tamuramaro.
He gave him the temporary title shogun at that time. This is the begining of shogun.
For the first time, samurai were only guardmen hired by noble people. Later these military families took the place of emperors and aristocrats and established their own government to rule Japan.
No emperors or aristocrats, who didn't have military forces, had no choice but obey samurai government.
Shogun became not a temporary title but a permanent title.
Samurai ruled Japan for more than 600 years until the last shogunate collapsed.