Gintama takes place in feudal Japan, which has been conquered by the Amanto, aliens from outer space. This invasion led to a ban on swords, and samurai are now marginalized. Gintoki Sakata, a man who still holds onto the spirit of the samurai, works as a yorozuya with his friends Shinpachi Shimura, Kagura, and their pet dog Sadaharu. Their odd jobs, which range from helping the community to dealing with various adversaries, often lead to humorous and chaotic situations.