The moles never got the town's water, but the Mayor imprisons them anyway with assignment of death penalty, against Rango's better judgment. The Mayor has been preventing the town from getting water in order to build his own city, just as he saw the humans abandon old west towns to build metropolitan cities such as Las Vegas. He was the one who killed the bank manager. When Rango openly accuses the mayor during a golf match, he calls in Rattlesnake Jake, an outlaw who has been doing the Mayor's dirty work. Jake publicly exposes Rango for the fraud that he is, and even gives him a gun with one bullet in it to stand off. Rango walks away, with Jake's threat to never return under penalty of death.
Rango walks through the desert back to the highway, where he crosses the road to the other side, but faints from exhaustion. Desert cockroaches carry Rango to The Spirit of the West's cart, as described by Roadkill. The spirit tells Rango that he needs to be a hero in order to save his friends. Rango goes to the moles and tells them his plan to save their family from being executed. Rango and Jake stand off. Meanwhile, the moles have been redirecting the water pipes to flow directly into the city. In the ensuing chaos of Jake sees the shadow of a bird of prey, his greatest fear. While Jake evades the shadow, Rango makes his way to the bank. Jake suddenly realizes the supposed bird is just a cluster of bats being flown in formation by the moles. Jake shoots at them, and the Mayor's people take Beans hostage so Rango will turn himself in. Rango hands the Mayor the gun and allows himself and Beans to be placed in the town's safe, where the Mayor has redirected the water mane with intent of drowning the two.
While Rango attempts to figure a way out, the Mayor turns on Jake and aim the gun right at him, but Rango had taken out the bullet before giving him the gun. Inside the safe, Beans accidentally swallows the one bullet, which Rango Heimlichs out of her into the glass casing of the safe, which breaks the safe. Rango inadvertently saves Jake's life using just one bullet, his self-proclaimed legend. Jake tips his hat to Rango as he drags the Mayor off to be his next meal. Rango, Beans, and the rest live happily ever after.