Last week on iZombie, Major was arrested as the Chaos Killer became a zombie again. Will he be able to survive prison without deteriorating and attacking the other prisoners? We find out this week as Liv and Ravi try to undo the mess with Blaine’s help.

Liv is waiting for Ravi to get home when there’s a knock on the door. It’s the FBI with a warrant to search the property. The FBI finds ample evidence to use against Major and a sedative bottle hiding in Ravi’s sock drawer. Clive tells Liv they found Drake’s name on a list of victims in Major’s safe. She’s devastated. When Ravi comes home, he’s immediately arrested.

Clive asks Ravi why the drug was in his drawer and Bozzio shows him the body bags found under Major’s mattress that match what he uses in the morgue. He doesn’t say anything. Clive says if Ravi doesn’t start cooperating, he’s going to be charged as an accessory.

Credit: Diyah Pera/The CW -- © 2016 The CW Network, LLC. All rights reserved.

Major denies being a killer. Bozzio says he had motive to kill Drake because he was Liv’s new boyfriend. Major didn’t know. A lawyer, Brant, shows up and shoos Bozzio out of the room. Vaughn sent him.

Liv visits Major in jail and asks if Drake is alive. He tells her to talk to Ravi. She’s confused and asks him if he’s okay. He says he’s hungry.

Ravi tells Liv and Peyton that Major is the Chaos Killer. He explains that Major froze the bodies to save Liv from Vaughn. If they can get to Drake, the case would fall apart. Liv tells Ravi to ask Major where the bodies are while she works on getting brains for him.

Liv goes to Blaine for brains, but Don E tells her she has to pay $25,000.

Ravi talks to Major in code, using video games as a metaphor for finding the bodies. Major gives him directions.

In a terrible turn of events, Liv and Ravi go to the storage facility for the bodies and find the freezers empty. Ravi says Vaughn must have found the bodies after having Major followed. He took them to finish them off.

Liv is having trouble holding things together. Ravi says he’ll try to get a brain from the morgue.

Vaughn holds a meeting with a military contractor. They agree to buy the SuperMax business if the company is cleared in the Chaos Killer case. Vaughn tells his bodyguard, Janko, to have Major and Liv put down.

Ravi sneaks into the morgue but is caught by the new doctor. She tells him he can’t be there, but gives him a message from Blaine.

Bozzio is stuck talking to crazy people from the tip line because she knows she has no case. Clive gets a message from a prisoner wanting to talk about the Meat Cute murders. It’s from the guy who sold Major the guns he used to shoot up Meat Cute. He wants a deal in exchange for his testimony.

A woman comes in with her daughter, Kayla, who claims to have seen Major kidnap her neighbor. Kayla says she’s been doing poorly in school and staying out at all hours because she was afraid Major would come after her.

Blaine sneaks a brain to Liv and Ravi. Liv dives in but saves some for Major.

Vaughn gets Major out on bail. Janko stands by, ready to kill Major. Ravi waits in the car with a brain shake. Major is weak. When he gets to the bottom of the steps, Clive arrests him for the Meat Cute murders, sending him straight back to jail.

Unfortunately for Major, not only does Clive have testimony from the man who sold him the guns, he also has Major’s DNA in the Meat Cute freezer. Clive knows they were killing Major’s social work kids, giving him motive.

Bozzio is upset. Kayla’s testimony won’t hold up. The view from Kayla’s window was obstructed by tree branches, so she couldn’t have seen Major that night. She’s just using it as an excuse for acting out. Clive says the defense would have a field day if they knew.

Clive warns Liv that she’s the only thing standing in the way of Major’s conviction. She was his alibi for the Meat Cute murders. He says now’s the time to come clean.

Major tells Liv to get him the cure. He’s losing himself and it’s too late for brains. Liv refuses to wipe his memory. He says he’ll be lost one way or another. She says she’ll think of something.

Liv gets sneaky and creates an energy bar with brains in it. She puts it in a real wrapper and convinces Peyton to get it to Brant to be passed on.

Peyton flirts with Brant and asks him to get the bar to his client. She says Major has an amino acid deficiency. Brant trades the favor for a date with a two drink minimum.

Major gets the bar and bites into it, but Brant’s dog ate the original. He gave Major a replacement without brains.

Out of options, Liv goes to Clive and explains that Major is a zombie. She fills him in on the whole brain conspiracy. Clive doesn’t believe her until Liv shocks him by stabbing herself in the chest and going into zombie mode.

Clive uses Kayla’s story to ruin the case against Major and get him out of jail. Liv gives Major a brain smoothie. Bozzio asks Clive for an explanation. He won’t give her one. In a tear-jerking moment, she tells him goodbye.

Back in the morgue, Liv is on the phone with Ravi. She doesn’t see Janko coming. When Ravi gets to the morgue, Janko is wheeling Liv’s body out of the building in a body bag. When Ravi realizes it was her, he attacks Janko and wakes Liv with an epipen. Janko comes to, knocking Liv out again and attacking Ravi in a heart-pounding wrestling match. The tranquilizer gun goes off and Janko dies of an overdose.

Credit: Diyah Pera/The CW -- © 2016 The CW Network, LLC. All rights reserved.

Ravi is shaking when Liv wakes up. He doesn’t know whether to turn himself in or dump the body. Liv has a third option. She eats Janko’s brain and has a vision that the zombies Major kidnapped are alive in Vaughn’s secret basement.

See the promo for the two-episode season finale: