The Enterprise arrives at Bre'el IV to prevent the looming disaster of the planet's asteroidal moon falling from its orbit and crashing into the highly populated planet; as the ship arrives, the planet is already experiencing damaging effects of the moon's gravitational field. As the crew is working, Q appears on the bridge, naked and in mid-air before crashing to the floor. After regaining his composure and modesty, Q explains that he has been stripped of his powers and banished from the Q Continuum, and, per his request, transported to the Enterprise as a human. Captain Picard respects Q's wishes to be treated like a human, and promptly throws him in the brig.
As the moon continues to descend to the planet and the Enterprise crew failing to stall it any longer, Picard suggests that Q assist the Engineering team, as long as Q promises to offer all assistance required. After observing another failed attempt at stopping the moon, Q suggests, matter-of-factly, to "change the gravitational constant of the universe", which is initially dismissed by the crew. Q, experiencing hunger for the first time, is taken to Ten-Forward by Data, who suggests a chocolate sundae based on his observations of what Troi enjoys when in a bad mood. After ordering ten sundaes, his hunger is quickly displaced upon encountering Guinan, who takes advantage of Q's mortal form to stab him with a fork ("And you think I'M dangerous!" -Q). Shortly thereafter, Q is set upon by a cloud of microscopic Calamarain aliens, who, having previously been tormented by Q, have discovered his powerlessness and are attempting to get revenge. After raising the shields to prevent the Calamarain from attacking Q, Picard determines that Q took refuge on the Enterprise to protect him from other alien species that hold a grudge against him.
Q's idea of manipulating the gravity field of the moon sparks an idea for La Forge, and he proceeds to test it; however, the test lowers the Enterprise's shields, allowing the Calamarain to attack Q again. Data attempts to step in and prevent their assault, but is charged with electricity nearly frying his positronic brain. Realizing that his presence on the Enterprise is doing more harm, Q takes a shuttlecraft and leaves the protection of the ship; the Enterprise crew is unable to transport Q back to the ship or retrieve the craft by tractor beam. As the Calamarain close onto the shuttle, a second Q being (Corbin Bernsen) appears on the shuttle, and informs Q that the Continuum, seeing Q's actions on the Enterprise, is willing to give him a second chance and restore his powers. Q readily accepts, and shrinks the Calamarain ship and teleports it into the palm of his hand and gloats over the restoration of his powers. The other Q reminds him that he should reflect upon the lessons he's learned from his experiences as a human, and he grudgingly turns the tiny aliens loose without harming them. Q returns triumphant to the Enterprise bridge after using his powers to restore the Bre'el moon and saving the planet, and celebrates with a mariachi band and cigars, much to Picard's displeasure. As he departs, Q promises to bestow a small gift on Data for showing him how to be human. Shortly after Q disappears, Data begins to laugh uncontrollably for a moment, to the surprise of the rest of the Enterprise crew.