Miyashogun (shogun from the Imperial Court) (宮将軍)
Miyashogun (shogun from the Imperial Court) refers to the term that specifies four imperial princes who were assigned to seii taishogun (literally, "great general who subdues the barbarians") during the Kamakura period. They were also referred to as Kozoku shogun (Shogun from the Imperial Family) or Shinno shogun (Shogun from the Imperial Prince). Since the four Miyashogun were selected from the Imperial Family members with a close blood relationship, they were also referred to as 'Kamakura no miyake' (Kamakura Palace family).
The fundamental lord and vassal structure of the Kamakura bakufu (Japanese feudal government headed by a shogun) was formed through obligation performed by Kamakura-dono (lord of Kamakura) who was a toryo (head of samurai clan) corresponding to seii taishogun to gokenin (an immediate vassal of the shogunate during the Kamakura and Muromachi through Edo periods), and service performed by gokenin to Kamakura-dono. However, the Minamoto clan Shogun died out for the reasons; there was no descendant from the main line of the Minamoto clan apart from MINAMOTO no Sanetomo who succeeded Kamakura-dono; Sanetomo had no children. Masako HOJO, Sanetomo's mother, and Yoshitoki HOJO, Masako's younger brother hoped to select the head of the samurai clan from among the Imperial Family members and proposed it to the Imperial Court in 1218. However, the assassination of Sanetomo that took place in the following 1219 derailed the realization of the proposal; the Retired Emperor Gotoba refused it. The proposal was eventually realized in the way that the two-year old FUJIWARA no Yoritsune who had a blood relationship with MINAMOTO no Yoritomo would leave the capital for Kamakura to succeed shogunship.
Thereafter, FUJIWARA no Yoritsune and his son, FUJIWARA no Yoritsugu succeeded the shogunship, but would have Imperial Prince Munetaka, the first prince of Emperor Gosaga to Kamakura as a Shogun following the requests of Tokiyori HOJO in 1252.
However, by that time, the power of the bakufu had been grasped by the Hojo clan who served as a Shikken; shogunal regent, the existence of the shogun was just nominal. For that reason, it was common that the post of shogun was assumed before he was 10, and he was sent back to Kyoto in his 20's after he was resigned as Shogun; he would be appointed to Nakatsukasa-kyo (Minister of the Ministry of Central Affairs) or Shikibukyo (Minister of the Ministry of Ceremonial) after that. However, Imperial Prince Morikuni, the last Shogun was the only exception; he couldn't go back to Kamakura and became a priest.
Among the Tokuso Family of the Hojo clan, Tsunetoki HOJO, the fourth Shikken and Tokiyori, the fifth Shikken were allowed to use a portion of the real name of Yoritsune KUJO who was Sekke Shogun (Shogun from a regent family), and Tokimune HOJO, the eighth Shikken were granted use of a portion of the real name of Imperial Prince Munetaka. Both of Sadatoki HOJO, the ninth Shikken and Takatoki HOJO, the fourteenth Shikken were not granted to use a portion of the real name of the Shogun.
The story regarding the establishment of Miyashogun during Edo period
When Ietsuna TOKUGAWA, the fourth Shogun of the Edo bakufu passed away without an heir in 1680 (the Edo period), Tadakiyo SAKAI, Tairo (chief minister), advised to have Imperial Prince Arisugawanomiya Yukihito from the Arisugawanomiya family for the next Shogun.
After all, Tadakiyo SAKAI's proposal didn't realize receiving an opposition from Masatoshi HOTTA; this is the story regarding the establishment of Miyashogun
This was written in "Tokugawa jikki" (The True Tokugawa Records), but it has been recently said that this was one of insinuations made by the opposing party.