On movie night at the nuclear plant, Homer learns that the nuclear power plant is being shut down and outsourced to India. After Homer is sent to train the new employees, he becomes power-hungry. Meanwhile, Patty and Selma meet their Hollywood heartthrob, Richard Dean Anderson, who played MacGyver, who stops by to ask for directions to a convention about his newest show Stargate SG-1, only to find that he is totally uninterested in MacGyver and only did it for the pay. Meanwhile, Homer realizes to his horror that he has come to India (which he has mistaken for Indiana, among other misconceptions). After a brief standoff with a sacred cow, Homer looks for a relative of Apu named Kavi, who should be around somewhere. Choosing to randomly ask people, he gets the right man on the second try.
Back in Springfield, Patty and Selma kidnap Richard Dean Anderson from his Stargate SG-1 convention and tie him to a chair. From there, he manages to escape by using one of his contact lenses to focus the sunlight and burning the ropes, only to discover that he loves escaping, and starts having Patty and Selma put him through increasingly complex MacGyver-esque kidnapping trials. Patty and Selma eventually tire of Anderson's antics, and decide to drive him away. They sit him down one night and show him slides of their vacation to the horse-drawn carriage museum in Alberta, Canada. Anderson is so overwhelmed with boredom he jumps out the window and never returns.
In India, Homer is coming to love the concept of outsourcing. With “help” from a book Marge gave him to read on the plane trip, The Cereal Is the Prize, Homer is able to spur the "natives" into a working frenzy (actually they assume that if they cheer, they will be allowed to go back to work). Homer, Smithers, and Mr. Burns get a positive (if inaccurate) impression from this, and Homer is put in total charge of the power plant while Mr. Burns takes time off to have fun floating down the Ganges with corpses he has befriended. Homer, left in charge of a slightly-overgrown nuclear power plant on a river in the middle of nowhere, appraises the Hindu deities and decides he might be a god himself. About a week later, Lenny and Carl come to the India plant, invited by a card claiming that Homer is to become a god.
Soon, the rest of the Simpson family, worried about Homer, travel to India and, with Mr. Burns, journey upriver on a PBR boat and find that Homer is ruling the plant like a god. Horrified, Marge and the kids tell the plant workers that Homer is not a god. They cheerfully explain that they know that he is not a god, and the reasons why they are worshiping him is because of the American workplace routines he has instituted, like coffee breaks, early retirement, personal days, and "muffin baskets and mylar balloons on your birthday!". It is revealed that Homer has instituted these routines in the workers' binding contracts, treating the workers as good human beings in exchange for their help for outsourcing the power to Springfield, much to Marge’s relief. Lisa then admits that she is proud of Homer for 'outsourcing the American worker's sense of entitlement and privilege'. However, Mr. Burns calls this “madness” and decides to close down the plant and move it to an area 'where the workers are more desperate and ignorant...Springfield'. Burns then fires all the workers; however, this makes the workers delighted due to the various firing clauses Homer has written into their contracts ("Golden parachutes for all!"). The episode ends with the Simpsons, Lenny, Carl, Patty, Selma, Richard Dean Anderson, and Smithers joining in a Bollywood style dance at the plant. The song sung at the end of the episode is Kishore Kumar's "Pal bhar ke liye" from the 1970 Indian blockbuster Johny Mera Naam, starring Dev Anand and Hema Malini.