In the story, there are two hints that things will not end badly for the narrator.
First, the swami's assistant manages to start up the road engine. This means that the engine can now be moved without extensive human assistance. Second, a devastating earthquake causes the road engine to be moved away from the compound wall.
In the story, the narrator wins a massive road engine at the fair. He is initially happy to have won the prize but soon becomes disillusioned with his win. This is because he cannot move the engine off the fairgrounds by his own strength. As a poor man, he also has few resources at his disposal.
The narrator is forced to pay rent to the Gymkhana Grounds in order to keep his engine there. Eventually, the administrators of the fairgrounds demand that the narrator remove his engine immediately. This is because a cattle show is coming to town. The narrator desperately asks for help, but no one seems to be able to offer him any assistance. In the end, the priest of a local temple offers the narrator the use of the temple elephant.
The narrator also engages the services of an unemployed driver and fifty coolies. The coolies are to push the engine from behind while the driver steers the machine. Things do not go according to plan, however. The elephant drags the engine along, but the machine has great difficulty moving in a straight line. The coolies try to help, but the resultant "confused" maneuvering leads the engine straight into a nearby compound wall. The engine demolishes the wall, and this causes the elephant to panic.
In its panic, the elephant stomps down another portion of the compound wall. This in turn causes the fifty coolies to flee in fear. Eventually, the police come and take the narrator away. Now, he must pay for all of the damages caused. Meanwhile, the narrator's wife threatens to return to her father's home. She objects to pawning the remainder of her jewels to pay for the damages.
As for the narrator, he thinks about running away. He also decides that he will encourage his wife to return to her father's home. However, two important events occur that turn the tide in his favor.
First, a swami comes to town. During one of his performances, the swami insists that he will live even if he is run over by a road engine. The narrator is ecstatic upon hearing the swami's proclamation, and he immediately offers the use of his road engine. He takes the swami and his assistant to the compound wall, where the engine still sits. The swami's assistant manages to start up the engine. However, the town officials refuse to allow the swami to carry out his stunt. As a result, the engine continues to sit by the compound wall.
That night, a terrible earthquake occurs. The next morning, the narrator discovers to his glee that the engine is no longer at its previous location. A search party finds the engine closing up the mouth of a disused well. The owner of the well tells the narrator that he is thrilled with this state of affairs. With the engine in its present location, he no longer has to pay exorbitant municipal fees to close up the well. The story ends happily with the owner of the well offering to pay the narrator's previous expenses.