Tōyama Kagemoto (遠山景元, September 27, 1793 – April 15, 1855) was a hatamoto and an official of the Tokugawa Shogunate during the Edo Period of Japanese history. His ancestry was of the Minamoto clan of Mino Province. His father, Kagemichi, was the magistrate of Nagasaki.
During his youth, Kagemoto left his household due to family conflict and lived among commoners as vagabond. Legend says that he acquired tattoo during this period, which is the basis of folklore of tattoo bearing magistrate. When he inherited the title of his household, he returned to his samurai post and eventually became magistrate. Kagemoto held the posts of Finance Magistrate, North Magistrate, and subsequently the South Magistrate of Edo. (The magistrates of Edo acted as chiefs of the police and fire departments and as judges in criminal and civil matters.)
When Tokugawa Shogunate instituted Tenpo Reforms, South Magistrate Torii Yōzō and Rōjū Mizuno Tadakuni tried to enforce sumptuary edicts banning theatre and other popular entertainments. Kagemoto consistently opposed the implementation of the policy which he believed it to be undue infringement on the livelihood of commoners.
Together with the fact that he lived among commoners in his youth, this won him tremendous popularity among the people of Edo. In 1843, he was ousted from his position as North Magistrate through the machinations of Torii, and although nominally appointed Ōmetsuke, was out of power. Two years later, when Mizuno ousted Torii, Tōyama received an appointment as South Magistrate, a post once held by Ōoka Tadasuke.
Tōyama's rose to the Lower Junior Fifth rank with the name Tōyama Saemon no Jō.
In kabuki and kōdan, he was celebrated under his childhood name of Kinshirō, or popularly, Tōyama no Kin-san (Mr. Kin of Toyama). The common theme is the image of a magistrate with a flashy cherry blossom tattoo on his shoulder, who fights against corrupt officials and greedy merchants in defence of the ordinary forks. The novelist Tatsurō Jinde (陣出達郎) wrote a series of books about Kin-san. Noted actor Chiezō Kataoka starred in a series of eight Toei jidaigeki films about him. Several Japanese television networks have aired series based on the character. These variously portrayed him pretending to be a petty hood or a yojimbo while solving crimes as the chief of police.