They are in service of the ruling Shogunate in the world of Gintama. Though their main tasks do involve going after groups/individuals in anti-government or terrorist activities, they do perform regular police duties such as going on street patrols. In Episode 172 they were also tasked with interrogation of dangerous criminals when other departments are unable to make any headway.
Because they serve under the government, they have been given various negative labels, such as:
(幕府の犬) Bakufu no ken, aka The dogs of Bakufu by the Jouishishi,
(税金泥棒) Zeikindorobou, aka Tax revenue robbers by Sakata Gintoki.
Kondo Isao, Hijikata Toushirou and Okita Sougo left their hometown Bushuu to Edo looking for sucess. However being a group of Ronin was trouble and Matsudaira Katakuriko claims that he was the one that picked up Kondo's group and helped them create the Shinsengumi.
In Gintama, the Demonic Vice-Commander (「鬼の副長」) Hijikata Toushirou formulated the Kyokuchuu Hatto , the 45 Regulations that form the disciplinary framework for Shinsengumi members.
Kondou stipulated a new Regulation 46 to treat Shinpachi well in the Pen-pal chapter as reported by Okita (ep.127)
Regulation 1:
Regulation 2:
Regulation 3:
Regulation 4:
Regulation X:
Regulation 10:
Regulation 12: No comics other than that in Magazine are allowed to be read within the confines of the station (recited by Hijikata in Episode 105
Regulation 17: Turn off handphones during meetings and important ceremonies (recited by Hijikata in Episode 105)
Regulation 20:
Regulation 21: Personnel conspiring with the enemy shall be punished (recited by Okita in Episode 103)
Regulation 25:
Regulation 25 (Supplementary Regulation): All personnel must consume 5 bottles of mayonnaise each everyday (recited by Hijikata in Episode 185)
Regulation X:
Regulation 45: All warriors following the path of bushido must achieve enlightenment upon death and are forbidden to turn into ghosts (recited by Hijikata in Episode 105)
Regulation 46: Yorozuya is to be hated, but treat Shinpachi well (recited by Okita)
In the original Shinsengumi (新選組), the character for 'Shin' (新) literally means new. In the Gintama version, the character for 'Shin' (真) literally means 'real' or 'true'. There is a possibility of the manga author's pun here as there are many other characters that can be read as 'shin', which the author did not choose.
Shinsengumi's police cars are white, where as Mimawarigumi's police cars are black, which is contradicting their own trademark colors