Empire Records is under attack, but you’ll never guess who was behind the hack that had everyone from Lucious to Cookie losing their minds. The entire Season 3, episode 6 of Fox’s “Empire” had Lucious on a warpath trying to figure out who was trying to destroy his company, and the answer was right in front of his face the entire time.

The episode kicks off with Angelo (Taye Diggs) stopping by Cookie’s (Taraji P. Henson) house to bring her some coffee. Cookie and Angelo can’t keep their hands off each other, and we’re glad the romance is still going strong. At least for now. Cookie is distracted because one of Tiana’s (Serayah) songs keeps playing repeatedly on her cell phone, and she can’t figure out how to make it stop. Angelo is also distracted because he keeps getting work emails and texts, so he leaves.

Meanwhile, Jamal (Jussie Smollett) is in the studio with D-Major (Tobias Truvillion). He’s still struggling with his post-traumatic stress disorder but tells D-Major that he stopped taking his pain medication because he heard other artists get addicted to it. D-Major doesn’t think Jamal is ready to stop taking his meds.

The next scene focuses on Lucious (Terrence Howard) and Anika (Grace Gealey). Anika is singing to baby Bella trying to get her to stop crying, and Lucious walks in playing a lullaby to help. Suddenly, that same Tiana song starts blasting across his iPad with the message, “Lucious Lyon … You been got.” Empire Records has been hacked.

Andre (Trai Byers) brings in a cyber guy to figure out who is behind the hack. Lucious wants the issue resolved as soon as possible.

As the hack is going on, Hakeem (Bryshere Y. Gray) is in the studio with Nessa (Sierra McClain) recording a duet. Andre interrupts their studio session to tell Hakeem about the hack, but Hakeem is still mad Andre hooked up with Nessa. Hakeem wants Nessa to choose between them but she won’t do it. Andre insists he had no idea his brother had a crush on Nessa.

Andre and Lucious zero on their first suspect in the Empire Records hack: Von Miller (French Montana). Von denies he was behind it. The cyber guy then bursts through Lucious’ office door warning everyone not to open any emails. Lucious gets a message saying the hacker is demanding $1 million. He gets angry and throws the cyber guy on the couch telling him he better figure out who is behind the hack.

The poor cyber guy is able to figure out some information about the hack, like when the breech occurred. However, he informs Lucious that things just got worse and the hacker now has access to everything, not just emails. Thirsty (Andre Royo) hands Andre a stack of the leaked emails and says that there could be information in them to figure out what is going on. Andre volunteers to go through the emails, and holds a meeting with the board members to tell them what’s going on. The board members want Lucious to pay the ransom, but he refuses.

Empire Season 3 episode 6 “Empire” Season 3, episode 6 reveals that it was one of the Lyons that was behind the hack. Photo: Fox

Cookie has to leave the meeting when she gets a phone call from Tiana. Tiana is upset over a video her ex Gram (Romeo Miller) did slamming her and Empire. Tiana starts crying and says the hack is ruining her career and she wants Cookie to fix it. Lucious interrupts and tells everyone they need to get down to the lobby.

Hakeem is down in the lobby with Tariq (Morocco Omari) right behind them, but everyone is focused on the TV screen. The hacker is flashing some of the emails across the screen. A message then pops up that reads: “Cookie’s Cookies.” Everyone is confused until nude photos of Cookie start to flash across the screen. Lucious hurls a chair at the TV screening breaking it.

It turns out that Cookie’s nude photos — which she had sent to Angelo — ended up in the hands of his campaign manager who banned Cookie from seeing Angelo. Cookie storms into Lucious’ office asking if he leaked the photos but he denies it. That’s when Anika pops up into the office with Shine (Xzibit). Shine denies he was involved in the hack, and Anika believes him. The hacker then sends Lucious another message: “Get ready because there is more.”

Because of the leaked photos, and Cookie’s past, she breaks up with Angelo telling him that she wouldn’t be able to forgive herself if he lost the election because of her. Angelo tries to change her mind, but she asks him to leave. As he closes the door, Cookie starts crying.

Finally, the cyber makes a break in the Empire hack. He tells Lucious and Andre that they found a flashdrive in Studio 6, the one Tiana is using. Lucious and Andre pay a visit to Tiana and she tells the only people who’s had access to the studio is her friends, her engineering team and Gram. Tiana then remembers that Gram was always taking jabs at Lucious and Andre and she believes he may be behind the hack.

Lucious and Andre pay Gram a visit at his home. Gram is cocky but denies he is behind the hack. Unfortunately for him, Lucious and Andre don’t believe him and leave Shine and his men to handle Gram. As Lucious and Andre leave, Gram is heard screaming in the background.

Meanwhile, Xavier (Samuel Hunt) is freaking out about how to handle the hack and goes to Becky (Gabourey Sidibe) about what he should do so Tiana’s image isn’t ruined. Becky gives Xavier some good advice and he thanks her and says that he’s going to give her credit for it, but he doesn’t, and Becky is not happy.

While all of this is going on, Jamal is dealing with his own issues. And they’re serious. Jamal decides he wants to start taking his medication again but he’s drunk. Mixing medication and alcohol is never a good idea, and Jamal will find that out later. He calls Phillip (Juan Antonio) but he doesn’t answer, so Jamal dials D-Major and tells him that he’s back on his meds and invites him over.

D-Major shows up as Jamal is playing a song on the piano. Jamal enthusiastically tells him that he wants to write a song revealing his family’s secrets, the good and bad. Jamal and D-Major start flirting, then making out, and then end up in Jamal’s bed. After a nap, D-Major tries to wake Jamal up but he won’t budge. D-Major panics and calls Phillip telling him that he needs to come ASAP because Jamal overdosed. Phillip says he can feel a faint pulse on Jamal, and carries him to the shower and turns the water on. Jamal finally wakes up.

The episode ends with Andre bringing Nessa to a shady location. He tells her that he trusts her and wants to show her something. She hides out as he meets up with Von. It’s revealed that Andre was behind the Empire Records hack and Von was working with him. Andre hands Von a bag full of money. Andre tells Nessa that he wants to take over Empire and he wants her by his side.

One more revelation is made on Wednesday’s “Empire”: Cookie loves Angelo. When Angelo is approached by the media about Cookie’s nude photos he tells that Cookie dumped him because of the media constantly trying to dig stuff up about her. To show he supports Cookie, Angelo strips down to his shirt on live TV and Cookie surprises herself by whispering that she loves Angelo.

“Empire” airs Wednesdays at 9 p.m. EST on Fox.