Recent rebel activity around the universe has caused the dictatorship known as the Galactic Empire to announce new yet much worse laws. Taxes are raised five times, and the use of any local traditions like festivals as cover for rebel activity will cause a permanent removal of Imperial tolerance. Any criminal act no matter how small will be classified as a Class One offense, and all outstanding fines must be paid in full.
After getting involved in various rebel activities that included killing guards and stealing from the Empire, Cassian secretly returns to his adopted family’s home on planet Ferrix. He’s welcomed by his mother Maarva, who warns him this isn’t a safe place for him because Empire troopers are everywhere. Someone has snitched on him and now he’s a wanted man.
Cassian explains he’s made good money so they should escape together in the morning. Afterward Cassian sneaks around to visit Bix at her salvage yard. However she isn’t happy to see him because his presence equals danger.
Everyone in town blames him for the troopers that have taken over and it’s just a matter of time before someone turns him in. He promises he’ll be gone in the morning and asks her about a mysterious buyer that was supposed to contact him, but Bix doesn’t know the person’s identity. As Cassian carefully navigates the town to avoid the troopers, he remembers a day from a few years ago.
While the troopers marched on the streets, a group of rebels started to throw rocks. Cassian’s father tried to stop them to avoid trouble but it was too late: the troopers turned around and arrested the protesters together with Cassian’s father, who was hung as punishment. After avoiding a few more guards, Cassian gets home, only to learn Maarva doesn’t want to leave.
She points out the Empire is everywhere so leaving won’t make a difference, she’d rather stay and help the rebellion. Cassian thinks she’s crazy and leaves alone. Sometime later, Cassian is living on the beach resort world of Niamos under the fake name “Keef Girgo”.
Whenever he’s out on a walk, he keeps glancing at all the drones and troopers in the area, showing a bit of paranoia. One morning a trooper notices this and calls out his suspicious behavior, so Cassian tries to explain he’s only going to the store. The trooper doesn’t believe him and stops him from leaving while a droid chases after some people that are currently running away.
Once it’s done with the others, the droid grabs Cassian by the neck and holds him against the wall. Moments later Cassian is at the courthouse, but at least they don’t know his real identity. He’s charged for civil disruption, anti-Imperial speech, fleeing the scene of an anti-Imperial activity, and damaging Imperial property.
He tries to protest against these lies, but the judge adds it as another charge and gives him six years in prison. Then Cassian is put in line with other prisoners to board the transports that will take them to different prisons. Once again he tries to explain he’s just a tourist, but the troopers just threaten him with weapons to keep him moving.
Inside the shuttle, all the prisoners are ordered to remove their shoes and their hands are shackled to the seats. Eventually they make it to Narkina 5, a planet mostly covered by water where each building is actually a giant ship. The prisoners are dropped at one of these ships and the warden explains this is a factory facility, meaning all the prisoners will be forced to work.
Then he presses a button that makes everyone squirm in pain until they fall. It turns out the floor can electrocute people on command, that’s why prisoners must keep their feet bare and the staff wears special boots. The floors are made of steel and there are three levels of shocks, what they just experienced was only level one.
After being given the prison uniform, Cassian is taken to his assigned factory floor. There’s a delay at the entrance and he gets to hear all the details of the guards’ shifts. All the prisoners put their hands on their heads as soon as they see a guard and Cassian is sent to the working area on an elevator.
The factory has seven levels and Cassian has been assigned to the day shift on level five. The manager of this unit is Loy, who shows Cassian the ropes. The shifts are twelve hours long and the prisoners are under constant evaluation.
The different areas compete against each other, so Loy tells Cassian not to slow them down if he doesn’t want trouble. Cassian is sent to work and he meets his table mates, who are trying to rush through the job. Since they’ve been missing a man for a while, they’re behind on production.
Suddenly it's announced that sector five’s productivity isn’t acceptable and Loy orders everyone to hurry up, threatening to punish the slowest table. Everyone starts working as fast as they can, putting all their energy into it. After the day is over, the prisoners are puts in lines again so the night shift can come in.
Cassian notices a man talking to a guy from another sector using sign language at the window. Then Cassian’s group is taken to their block, where he learns about the lights: white is cold, red is hot. If the white lights start flashing, it means they have a few seconds to get in their cells.
There are sensors in the floor, so if they detect two men in one cell, they get instantly fried. Cassian’s taken to his new cell, which has a wall rack with all the necessities: water, night light, shaver, plate with a spoon, and a toilet that comes out. The food comes from a tube and he can eat as much as he wants because the guards like them “healthy and fueled”.
The factory team that wins the day’s productivity numbers gets more flavor, and those whole lose get fried. There’s also a screen on each cell that counts how many days each prisoner has left. A man asks Cassian what he did and when Cassian says “nothing”, they guy isn’t surprised and shares that they recently doubled everyone’s sentences under the new law.
The prisoners start discussing all the news and the situation with the rebels, but Cassian pretends he knows nothing. A man tells Cassian not to look at the number because it doesn’t really matter, they’ll be in prison as long as the Empire needs slaves. He’s interrupted by Loy, who pushes him against the wall and makes him shut up.
At that moment the alarm announces a red floor and everyone enters their cells before they could get fried. The lights stay red all night long and turn white in the morning. Thirty days later, Cassian has gotten used to the prison routine.
He eats the disgusting food from the tube, brushes his teeth with a toothbrush also connected to the wall, and joins his group in a communal shower. The washing is done by automated steam before the prisoners are given fresh clothes. Then the prisoners are put to work for twelve hours, and if anyone slows down for even a second, Loy calls them out for it.
That night Cassian is woken up by a horrible sound: it turns out a prisoner self-deleted by jumping on the red floor. Instead of showing sympathy, the other prisoners complain about the smell and how this will affect productivity. On Ferrix, Bix and a friend are taking care of Maarva, who has become very ill.
Bix enters a secret area behind a repair shop and activates an illegal radio transmitter to try to send a message to Cassian about his sick mother. The rebel network picks up her message and the leaders shut down Bix’s line for security reasons. The next day, Bix is horrified to discover that the troopers arrested the owner of the repair shop and feels guilty for using the radio.
The captain sees her in the crowd and calls her name, so Bix immediately runs away as fast as possible. Unfortunately the guards soon catch up to her and she’s captured too. She’s then taken to Lieutenant Meero for interrogation.
Meero threatens her with pain if she doesn’t cooperate and begins asking about Cassian and the mysterious buyer. When Bix points out Meero won’t believe anything she answers, Meero authorizes torture. Bix is tied to the chair before a doctor puts a headset on her that makes her yell in unbearable pain.
After hours of torture, Meero starts the interrogation again. After she’s done, she tells the guards to keep Bix alive as a witness, but they can hang the repair shop owner. In prison, Cassian’s teammate Ulaf has an injured hand and can barely work, so Cassian takes over his job.
Loy congratulates Cassian for thinking fast and announces that Ulaf will go home soon because his sentence only has a few days left. Later Cassian takes his bathroom break and while nobody is looking, he removes a panel and starts filing a pipe. At that moment the arrival of a new prisoner is announced and Cassian runs back to get in position.
Then he and Birnok watch closely to learn the movements of the guards, revealing they’ve been planning to escape for days now. After the new guy is dropped, the prisoners keep on working and Ulaf insists on working hard and fast regardless of how he's feeling. After the shift is over, the line to go back is slower than usual.
Using hand signals at the window, they learn something is going on in level two. Suddenly the power goes out, but it returns in seconds. Loy informs them that a man is missing so the lines are being delayed for counting.
An alarm starts to wail and the prisoners can tell the situation in level two is getting worse, but Loy doesn’t let them sign at the window anymore. Then a voice announces that they want everyone to behave tonight or they’ll activate the floors without warning. Once they’re back in their cells, Cassian asks the new prisoner if he ever thinks about escaping, but Loy doesn’t let him reply.
Cassian also tries to get information from Loy about the guards on the other floors, however Loy refuses to answer and warns Cassian about his crazy ideas before going to sleep. A frustrated Cassian yells that nobody is listening. The next morning during the shift change, the night team tells Cassian’s group that one hundred prisoners on level two were fried.
Ulaf has trouble hearing and asks what happened to the level two team, so the new guy tells him they were “set free”. Loy punches him for such a dark comment but Cassian stops him before it escalates, reminding him to pretend they don’t know anything or the guards will turn their attention to them. Then Loy tells everyone that the level two deaths are a rumor and they heard nothing.
During their shift, Ulaf shows signs of exhaustion and has trouble keeping up. At the end of the day, Ulaf can barely stand anymore, so Cassian and the others must cover him from the guards. Regardless of Ulaf’s situation, another table did less work than them so Cassian’s team doesn’t get fried.
On their way to their cells, Ulaf finally collapses. Loy asks the night shift manager to get for a doctor and tells Ulaf to hang in there because he only has a few shifts left before going home. Soon a medic arrives and after a quick look, he announces there’s nothing to be done because Ulaf had a massive stroke.
While getting an injection ready, the doctor says in a week everyone will be begging for peaceful death like this and advices Loy to keep his men in line. Ulaf is given a euthanasia injection and dies without pain. The guard leaves to get a bag and trolley, so the doctor uses the chance to explain that a man who was released from level four ended up back on two the next day.
When the level two prisoners learned about this, everyone was murdered. Cassian and Loy realize that nobody will ever leave this prison. When they’re sent back to their cells, Loy finally tells Cassian that there are no more than twelve guards on each level.
Cassian says they need to leave tomorrow because the guards must be scared of something if they killed one hundred men to keep them quiet. The rumors will spread and soon everyone will know, so they have to leave before they reinforce security. Loy doesn’t think Cassian’s plan is good enough, so Cassian shakes him and points out they’ll bring a new guy to replace Ulaf, meaning it’ll be the perfect moment to strike.
Once they’re back in their cells, Cassian tells everyone what he learned from the doctor and Loy finally snaps, yelling that nobody is ever getting out. He sends everyone to bed by telling them to think about it. The next morning Loy gives an inspirational speech to convince everyone they must escape by working together.
On their way to the factory, the intercom announces that all shift changes will be silent until further notice. For the next few hours, everyone works and stays in their best behavior. When Cassian finally sees an opening, he leaves his table and a teammate discreetly passes him a wrench that he hides in his sleeve.
Birnok also leaves his table and gets in position while the guards announce the new guy is coming, and the prisoners begin gathering machine parts or tools to arm themselves. Cassian makes it to the bathroom and starts filing the pipe again, causing further damage with the help of the wrench. After applying lots of strength, the pipe finally bursts and water begins pouring out.
He then runs back to the factory just in time for the arrival of the new prisoner. As water starts reaching the room the guards activate the lift and the prisoners trigger their plan. Two guys pretend to have an argument that escalates into an actual fight, and while the guards are distracted watching them, Cassian puts the wrench into the elevator to jam it.
Next the prisoners break a machine to expose a thin tube that produces steam. As the guard on the elevator tases the new guy, Birnok jumps on the platform and pulls using all his weight, breaking it. The guard falls and drops his taser, which is grabbed by the new prisoner to get his revenge.
After the guard goes down, another officer brings the new man down with a quick shot. All the officers are getting ready to open fire, however Loy commands the prisoners to attack and they start throwing things at the guards. Shots are still fired and a few prisoners are brought down.
Birnok tries to keep on climbing, but sadly he’s shot down so Cassian takes over. Eventually the guards get tired of the projectiles and order to activate the floor. The prisoners immediately jump on the table, but a few who aren’t fast enough get electrocuted anyway.
The floor’s power makes contact with the water and triggers a short circuit that shuts down the power on level five. Now that the electric floor is disabled, the prisoners can move freely and Loy leads a revolt. The guards open fire again, bringing down more prisoners in the middle of the chaos.
Cassian continues to climb and finally reaches a guard, so he makes him trip and punches him to knock him out. Then he uses the man’s gun to shoot the other guard. Now Loy and the rest of the prisoners can climb too while Cassian kills the guard at the control panel.
Meanwhile on the other levels, water is started to leak through the machines. Soon the prisoners reach the weapon closet and everyone gets armed. When more guards arrive, they immediately get shot down.
The control panels in other levels begin warning about water issues too and more officers are sent to investigate. The guys from level five start spreading through the facility and killing more guards while calling other prisoners to join the fight. The elevators are activated and soon more men are joining the revolt.
Shootouts ensue in the corridors but no matter how many prisoners the guards manage to kill, dozens more leave their work stations to fight. While Loy and Cassian make their way upstairs, a countdown is announced to isolate level five. However the duo reaches the command center and kills an officer as they demand the countdown to be turned off.
Once that’s done, the duo also forces the officers to shut down the power. The hydro generators are stopped and power goes out in the entire prison before the backup generator kicks in. Next Cassian keeps both officers against the wall while Loy uses the microphone to inform all the levels what’s going on, urging every prisoner to escape now that the floors are deactivated.
He also confirms that level two was fried and they have no future here, so dying trying to escape is still a preferable end. Soon there’s a riot in every level with prisoners running all over the place and gathering weapons as they chant “one way out”. Realizing they’re vastly outnumbered, the surviving guards stay hidden in a bunker.
The prisoners run through all the corridors and up the stairs until they finally reach the top of the facility. Everyone starts jumping into the water except for Loy, who admits he can’t swim. Before Cassian can help him, he’s pushed down by the excited crowd.
A few hours later Cassian and another prisoner have reached land and are running away under the light of three moons.