The apparatus, the machine used to execute prisoners in the penal colony, is the focus of attention for the officer despite an unenthusiastic response from the residents of the penal colony. The prisoner, who is to be executed, is guarded by a soldier, who looks on as the officer explains the nature of the apparatus and the methods of execution to the explorer, a visitor to the penal colony whose fame and notoriety comes from his background as a Westerner with a European education. Giving a brief history of the penal colony in the tropical heat, the officer talks of the old Commandant, who he believes perfected society on the penal colony, including inventing the apparatus, and made the officer his right-hand man.
As the officer gets into the detailed components of the machine, the explorer’s interest is piqued. Even the prisoner moves to get a closer look at the intricate machine that will eventually write out his sentence onto his flesh. The explorer derails the officer’s long-winded explanation of the apparatus by inquiring about the prisoner’s sentence and trial. Frustrated at the new Commandant for not explaining his methods to the guest (a duty the old Commandant always took seriously), the officer explains the prisoner is never told of his crime, instead, he learns of his wrongdoing when the apparatus writes the sentence on his body right before his death. To the officer, who, conveniently, is also the judge of crimes, any sort of defense is forestalling the inevitable because he believes that anyone accused of a crime is consequently guilty.
The longer the officer explains the workings of the apparatus, the more the explorer is uncomfortable with the system of justice and the cruel form of execution, which becomes more absurd with the increasing level of detail in the apparatus. The explorer begins to feel guilty for even witnessing the execution, but he calms himself by suggesting he has no right to interfere with the cultural norms on the island.
While loading the prisoner onto the apparatus, the officer tells the explorer that he needs help to maintain this authoritarian system of justice and continue to use the apparatus. Evidently, the new Commandant does not approve of this judicial system, and instead prefers to holds conferences that are open to the public. The officer hopes the explorer will make a case for the old Commandant’s system of justice and the new Commandant will see the error of his ways.
The explorer responds that he cannot support the officer—even if he will do nothing to stop the present execution—and he cannot tell the new Commandant that the apparatus is the proper way to administer justice. Upon hearing this, the officer quietly releases the prisoner, tells him that he can go free, writes his own sentence, feeds it into the apparatus, and then disrobes and places himself on the apparatus. The explorer looks on and concedes that the officer’s actions demonstrate his appropriate conviction to his beliefs. The officer judges himself to be guilty of the crime of failing to uphold justice because he cannot maintain the old order.
As the officer dies, the apparatus falls apart in front of the explorer, soldier, and prisoner, who do reluctantly try to save the officer from the malfunctioning apparatus, which is now brutally murdering (instead of methodically torturing) its victim. After the officer’s death, the explorer goes to the teahouse to view the grave of the old Commandant, whose headstone suggests he will someday return to the penal colony. The explorer distributes some money to a group of dockworkers before leaving the teahouse and walking to a boat to take him to his ship. The soldier and prisoner follow, but the explorer does not allow them to board the boat with him and instead leaves them on the island.