In 2015, Powell, Donovan and Robot SPD-13 (also known as "Speedy") are sent to Mercury to restart operations at a mining station which was abandoned ten years before.
They discover that the photo-cell banks that provide life support to the base are short on selenium and will soon fail. The nearest selenium pool is seventeen miles away, and since Speedy can withstand Mercury’s high temperatures, Donovan sends him to get it. Powell and Donovan become worried when they realize that Speedy has not returned after five hours. They use a more primitive robot to find Speedy and try to analyze what happened to it.
When they eventually find Speedy, they discover he is running in a huge circle around a selenium pool. Further, they notice that "Speedy’s gait [includes] a peculiar rolling stagger, a noticeable side-to-side lurch". When Speedy is asked to return with the selenium, he begins talking oddly ("Hot dog, let’s play games. You catch me and I catch you; no love can cut our knife in two" and quoting Gilbert and Sullivan). Speedy continues to show symptoms that, if he were human, would be interpreted as drunkenness.
Powell eventually realizes that the selenium source contains unforeseen danger to the robot. Under normal circumstances, Speedy would observe the Second Law ("a robot must obey orders"), but, because Speedy was so expensive to manufacture and "not a thing to be lightly destroyed", the Third Law ("a robot must protect its own existence") had been strengthened "so that his allergy to danger is unusually high". As the order to retrieve the selenium was casually worded with no particular emphasis, Speedy cannot decide whether to obey it (Second Law) or protect himself from danger (the strengthened Third Law). He then oscillates between positions: farther from the selenium, in which the order "outweighs" the need for self-preservation, and nearer the selenium, in which the compulsion of the third law is bigger and pushes him back. The conflicting Laws cause what is basically a feedback loop which confuses him to the point that he starts acting inebriated.
Attempts to order Speedy to return (Second Law) fail, as the conflicted positronic brain cannot accept new orders. Attempts to force Speedy to the base with oxalic acid, that can destroy it (third law) fails, it merely causes Speedy to change routes until he finds a new avoid-danger/follow-order equilibrium.
Of course, the only thing that trumps both the Second and Third Laws is the First Law of Robotics ("a robot may not...allow a human being to come to harm"). Therefore, Powell decides to risk his life by going out in the heat, hoping that the First Law will force Speedy to overcome his cognitive dissonance and save his life. The plan eventually works, and the team is able to repair the photo-cell banks.