Around 1665, the three main shogi families moved to the Edo (the old name for Tokyo), effectively the seat of the shogunate’s power. As the one of the few official roles of the shogi houses, they would be required to play a formal game in the presence of the shogun once a year.
The representatives of the three shogi houses would appear at Edo Castle to contest the game, in front of the shogun, Elders (officials called the roujuu, 老中), and other shogunate officials. These became known as the Oshiro Shogi (御城将棋), or the Castle Shogi games.
It is unclear exactly when this tradition started, but it certainly comes after the Castle Go started, which started circa 1626 between the four go houses. There are records of Castle Shogi games taking place from 1682 onwards between Oohashi Soukei V of the Oohashi main house and Oohashi Souyo III of the Oohashi branch house (with Soukei V giving Souyo III a bishop handicap). The earliest complete Castle Shogi kifu (game record) is from 1690, with Itou Souin II giving Oohashi Souyo III a left lance handicap and losing.
Starting from 1716, the date of the Castle Shogi was fixed on the 17th day of the 11th month each year under the old (lunisolar) calendar. This is the origin of Shogi Day falling on the 17th of November in the modern calendar.
In the beginning, the games had no time limit and would often not be finished in the castle but adjourned and continued at the residence of an Elder. To shorten the time taken on the day itself, starting in 1692 the games would need only to be concluded before the day at the castle. The game could be played to a conclusion beforehand, then the players would replay the moves before the shogun on the day itself. The physical act of making the moves at Edo Castle then took on a more ceremonial aspect, although the prestige of the games was undiminished.
A side effect of this change was that there would be more time on the day at the castle itself. This extra time would be used to play “okonomi” teaching games, where the house players and representatives would teach whoever wished to improve their shogi skills. The spectators and attendees would take up the offer; at the time of the Kansei reforms from 1787 to 1793, the Castle shogi games were not eliminated as unnecessary excess precisely because those who sought instruction were the daimyou and others close to the shogun. After the Castle shogi games took on a more ceremonial aspect, the Onkuroshoin room (御黒書院) where the games were held would turn into a shogi salon for the day.
After the date of the Castle Shogi was fixed, it was held almost every year until 1861 (except in 1730, 1775, and 1855). The final Castle games were played in 1861, amidst a backdrop of tension between the shogunate and the imperial nationalists. The shogunate had more pressing concerns with the worsening political situation, which would lead to the Boshin War and the overthrowing of the shogunate, followed by the subsequent Meiji restoration.
The Castle Shogi was the highest stage for shogi in the Edo period, and the kifu are worth studying to appreciate the skill and strength of the players of the time.