In Peru's San Jacinto district in the 1980s, a young, dyslexic, grade school dropout named Rogelio works for his older brother after his father's death. He is arrested for drug trafficking and doesn't betray his brother. He plays dumb and everyone "[sees] Rogelio as he assumed they would: as a clueless, ignorant young man from the provinces. All these years, and nothing [has] changed: he [is] still invisible." He's sent to Collectors, a notorious prison, where he is held for 18 months before his hearing.
A wealthy and famous playwright named Henry is sent to Collectors as well, for writing a play called The Idiot President, which depicts the president's assassination. He is accused of plotting to incite terrorism. His arrest is ridiculous and surreal to him.
At Collectors, he shares a cell with Rogelio, who teaches him how to survive the violent prison. An inmate named Espejo rules over their prison block, renting out the cell to Rogelio and Henry and on family visiting day, to prisoners who want to have sex with their girlfriends or wives during the day. Espejo commends a small army of inmates who defend their block from inmates in the other prison blocks.
One day, Henry sees a man with his wife and describes to Rogelio what he would do to his wife. There is sexual tension between Henry and Rogelio. As their relationship deepens, they sometimes lie in bed together, naked, touching. It is never stated whether they have sex.
With Espejo's permission, Henry convinces the men in their block to stage a performance of the play that landed him in jail, bringing a sense of comradery and unity. Rogelio plays the servant, who is stabbed in the back, with Henry teaching him to read the lines and practicing them with him. In the play, Rogelio acts out the death so movingly he receives a standing ovation even though the play isn't over.
Henry is eventually released. He thinks, but doesn't say, that he will wait for Rogelio, in a romantic way, on the outside. Months after his release, he learns that the entire block, including Rogelio, was killed in the military suppression of a prison revolt staged by the two neighboring blocks. Henry conceptualizes Rogelio as his lover, for the first time, and is haunted by his death. However, he thinks: "In truth the tragedy both broke him and spared him the need ever to think about his incarceration again. No one who’d lived through it with him had survived. There was no one to visit, no one with whom to reminisce, no one to meet on the day of his release and drive home, feigning optimism."