The movie starts with a shot of a chameleon (Johnny Depp) in a desert landscape acting the part of a hero, as he addresses other "people". We see him talking to a headless doll, dead cockroach and plastic palm tree and you realize he is acting. Shot pans out, and we see he is in an aquarium, obviously lonely with only the inanimate objects in his cage to talk to. He starts thinking about who he is, and how his life needs a change, and the movie pans out even wider and we see that his aquarium is in the back of a family van out in the desert traveling down the road. The car swerves to miss something in the road and the aquarium goes flying out the back, crashing onto the road leaving the chameleon out alone in the very hot desert.
As he is standing by the road, he hears a voice. He goes to investigate and sees an armadillo (Alfred Molina) that has obviously been run over by a car. He tries to help the armadillo get back on his feet, but he can't, the armadillo tells him that he was trying to cross the road and that he will see him later on. The chameleon continues walking down the road when he meets up with the armadillo once again - the armadillo tells him there is a town in the desert, just to follow his shadow. He doesn't quite believe him but seeing no other options heads off into the desert. Meanwhile, there is a Mariachi band made up of owls who act as narrators that introduce us to the main character and tell us that he's going to die. As he is walking in the desert a voice tells him to blend in, and we see a frog that is so well camouflaged you can't tell him from the sand. A hawk appears overhead and chases the lizard. He finds a bottle and climbs inside, but the hawk breaks the bottle and he ends up rolling through the desert. Finally, the hawk grabs the frog and flies off.
He wanders for awhile then ends up falling asleep in a drainage ditch. He begins dreaming about riding the plastic fish from his aquarium then wakes as water washes him out of the spout and back on to the sand. As he runs around trying to drink some of the water it evaporates in the extreme heat leaving him with nothing. While he is scrambling in the sand a lizard appears, riding a wagon, she asks him who he is and what he's doing in the desert. She introduces herself as Beans (Isla Fisher) and he ends up hitching a ride into the town of Dirt. She drops him off within sight of the town then continues on without him. He walks into town and is accosted by some local children, telling him that he is a stranger and that strangers don't last long in Dirt. He goes in to the local saloon, and everyone goes quiet as he enters. He asks for some water and they all laugh at him. They start asking him who he is, and he realizes that since no one knows him, he can be whoever he wants. He pretends to be a tough gun fighter named Rango and tells them stories about where he's from and how he killed 7 local brothers with one bullet. They are all impressed by him, and he is obviously really getting in to the part. The local bullies come in, and he ends up inadvertently offending them. He is then challenged to a gun fight, since everyone thinks he's a great hero he really can't say no and tries to talk his way out of is. While standing out in the street preparing to get shot, the hawk appears and frightens everyone away. Rango doesn't see it, and things they are afraid of him and everyone is impressed that he's not afraid of the bird, it then chases him around the town, and he ends up accidently killing it with one shot further impressing everyone in town. The mayor makes him sheriff and tells him the town needs something to hope for.
Meanwhile, we see Beans going to the bank, where the currency is water, and asking for a loan so she can keep her recently deceased father's farm. The banker confides in her that the bank is almost out of water and that he can't giver her a loan. As Rango is getting outfitted to be the new sheriff, the town clock strikes noon and everyone in town comes out to the main street and performs some kind of ceremony. They all end up at a large spigot which the Mayor has turned, once it's turned on only a tiny bit of mud comes out. All of the towns people are upset, as this is their only source of water. While all this is going on, Beans lets slip that the bank is almost out of water which starts a riot at the bank. Rango goes to the bank and tells the towns people that he will solve the water problem and not to worry, to trust him. They do, and they all go about their business.
That evening, while Rango is sauntering through town, some moles dig up through the main street, they are obviously looking to rob the bank and got lost. Not realizing this Rango, thinking they are miners, give them more digging equipment, a license to mine and points them towards the bank. They thank him, cut to the next morning when everyone finds out the banks been robbed, the water is gone. They round up a posse to find the thieves. They follow the tunnel underground and find a pipe, the pipe ends up leading them out to the desert and they find the mole and his boys. The posse decides they can take the robbers with their greater numbers and confront them. The mole laughs as about 30-40 other moles pop up out of the ground, pushing the odds in their favor. Rango and the posse jump on to the wagon carrying the water bottle and start to drive away, the moles then attack them, riding on bats and after a long chase, the water bottle ends up falling off the wagon and everyone sees its empty. The moles then confess that it was empty when they got it, meaning the bank had already been robbed.
Rango tries to decide who could have robbed the bank and remembers something the mayor had told him when he made him sheriff, "Whoever controls the water, controls everything". Back in town, the mayor realizes the Rango suspects him and brings in a hired gun fighter, Jake the rattle snake, Jake confronts Rango in front of everyone and exposes him as a fraud. He leaves wandering back into the desert and dropping his sheriff badge. He feels like he let everyone down, especially Beans who he had really grown to care for. Once he reaches the road, he walks across, mindless of the cars and trucks going all around him, and he reaches the other side. Once he is on the other side we can see he has just given up and lets himself fall down the ledge. Some pill bugs collect the now unconscious Rango and carry him away. He wakes up in a bright dream like desert where he sees the legendary figure referred to as the "Spirit of the West" an old cowboy (Timothy Olyphant). Rango realizes that he can be the hero he was pretending to be, and the armadillo from the movie shows up shows him that just over the next dune is Las Vegas. He sees the city, the vegetation and the water and realizes that he needs to stop the Mayor and save the town. He sees a pipe leading into Las Vegas and realizes that its connected to the pipe from town and sees that someone has turned the shutoff valve that leads to the town of Dirt. Forming a plan he heads back to Dirt where Beans is about to sell her fathers farm to the Mayor, the Mayor has bought all of the farm lands for next to nothing because there was no more water making them useless, no one knows that he has turned off the water for that very purpose. Now that Rango is out of the way, the mayor turns on Jake and is going to kill him.
Rango goes back and calls Jake out. Jake comes out to confront Rango in the street and ends up right over the boarded up hole that was dug by the mole bank robbers. Rango has the water from the pipe turned back on, and the water comes bursting up out of the hole, throwing Jake up into the air. The whole town explodes as water comes up all over, and the townspeople are all overjoyed. Their town is saved. The mayor ends up out in the street and is taken away by Jake in revenge for his almost killing him.
Rango becomes the true hero he was pretending to be, and finally knows who he is.
You can send in your spoiler to other movies by going here.