At the Springfield Nuclear Power Plant, it is time for the ceremony for the "Worker of the Week" award and Homer, the only employee who has never won the award, is confident he will win. However, Mr. Burns gives the award to an 'inanimate carbon rod'. The dejected Homer, feeling that no one respects him, turns to TV for solace and comes across a live space shuttle launch, which he finds dull. Meanwhile, NASA, frustrated over its drop in the Nielsen ratings, decides to send an "average shmoe" into space as the solution. At that moment, Homer telephones NASA to complain about their "boring space launches", as well as asking if they know where he can find some Tang, and NASA chiefs realize they have found their man. When they arrive at Moe's Tavern in search of Homer, who is currently calling Bill Clinton to ask about Tang, he believes he is in trouble for making a prank call to NASA and blames Barney for the incident. The NASA employees ask Barney to be an astronaut, and when Homer realizes what the proposal entails, he steps in and takes credit for the call.
NASA takes both Homer and Barney to Cape Canaveral for training. As only one of them can go into space, they soon find themselves in competition. Under NASA's alcohol ban, the newly sober Barney quickly develops superior skills and is selected to fly with astronauts Buzz Aldrin and Race Banyon. However, when Barney toasts his victory with non-alcoholic champagne, he inexplicably reverts to his normal alcoholic self and escapes, stealing a jetpack and crashing into a nearby pillow factory. Homer wins by default and is selected for space flight, but after watching an episode of Itchy and Scratchy involving space exploration, he becomes very nervous about going. Just as they prepare to take off in the Corvair space shuttle, Homer runs away. He talks with Marge on the phone, and she says that he ought to take advantage of the opportunity. He agrees, and the launch, which is also a Nielsen ratings smash, proceeds.
Finally in space, Homer reveals he has smuggled potato chips on board. He opens the bag, but is unaware that, due to the effects of weightlessness, they will spread around and clog the instruments. His appetite seems to save the day as he floats after the chips, eating them, but he manages to fly into an experimental ant farm, letting the ants loose in the shuttle. James Taylor comes in over the radio to sing "You've Got a Friend", but the disaster continues on board as the ants destroy the navigation system. James Taylor suggests that they blow the bugs out the front hatch, which the astronauts do, but Homer fails to put on his harness and is nearly blown out of the open hatch before grabbing its handle and clinging for life. Buzz pulls him inside, but due to the vacuum's sheer force, Homer bends the hatch handle, preventing the door from closing and potentially resulting in the shuttle's destruction on re-entry. When Race declares he will attack Homer in frustration, Homer pulls a rod out of the wall to defend himself, and he inadvertently uses it to seal the door shut. With the problems solved, the shuttle successfully returns to Earth, making a convenient crash-landing through the roof of a press reporters' convention.
Although Buzz Aldrin declares Homer a hero, the press only have eyes for the inanimate carbon rod he used. The rod is featured on magazine covers with the headline "In Rod We Trust" and is given its own ticker-tape parade. Back at home, Homer is disappointed that he did not get as much respect as he had hoped, but the family still honors him for his achievement.