Yojimbo (1961) is an uncredited film version of Dashiell Hammett's novel 'Red Harvest', which has never been officially filmed as of 2014. Red Harvest is about a detective who comes to a small city and sets two sides of a gang war against one another until both gangs are almost completely wiped out. The scenes where Toshirô Mifune's character is held and beaten, however, was taken from Hammett's novel The Glass Key (1935), which has been adapted for the screen twice.
Akira Kurosawa challenged his assistant directors to come up with an image for the film to let Sanjuro know he was entering a bad town. He shot down all of their ideas, since all of them had already been done. Kurosawa himself then came up with the idea of the dog carrying the human hand.
Akira Kurosawa told Toshirô Mifune that his character was like a wolf or a dog and told Tatsuya Nakadai that his character was like a snake. Inspired by this direction, Mifune came up with Sanjuro's trademark shoulder twitch, similar to the way a dog or wolf tries to get off fleas.
Akira Kurosawa asked his sound engineer Ichiro Minawa to come up with a sound effect to be used when a sword is cutting, and killing, someone. After testing out slicing a sword into beef and pork, he finally found the perfect sample; putting two wooden chopsticks inside a raw chicken, then hacking it with a sword.
In one scene, the samurai shows incredible skill at knife-throwing by impaling a blowing leaf against a wooden floor. This was accomplished by running the shot backwards. In the frame before the knife hits the leaf, you can see a slit in the leaf the same size and at the exact point where the knife penetrates it a frame later.
Sergio Leone was inspired by this film and made the famous Spaghetti Western A Fistful of Dollars with a similar plot. However, because Leone was unable to secure copyright laws to Yojimbo, Akira Kurosawa sued him.
Masaru Sato was instructed by Akira Kurosawa to write "whatever you like" so long as it was not the usual period samurai film music so commonly used by all the major studios at the time. He ended up writing something that was inspired by one of his idols, Henry Mancini, whom he had the pleasure of meeting shortly after the film was released, where they discussed his "Yojimbo" soundtrack.
Like in most Kurosawa films, rainy weather is present in a few scenes, increasing the effect of the characters' discomfort. The windy weather all throughout the film represents the chaotic life in the town.
The trivia item below may give away important plot points.
The massive amount of dust seen in the film being blown about the wind was actually imported by the truckload from an abandoned firing range. When the wind-machines started, it was nearly impossible for the actors to keep their eyes open because they were being engulfed in the dust. When Tatsuya Nakadai 's death scene, shot over the course of three days, with the combination of the fake blood and the blowing dust, made him break out in hives that lasted for weeks after filming.