In the early 1970s, Ron Stallworth is hired as the first black officer in the Colorado Springs Police Department. Assigned to work in the records room, he faces racial slurs from his coworkers. After he requests a transfer to undercover work, he is assigned to infiltrate a local rally where national civil rights leader Kwame Ture gives a speech. At the rally, Stallworth meets Patrice Dumas, president of the black student union at Colorado College. While she takes Ture to his hotel, Patrice is stopped by patrolman Andy Landers, a racist officer in Stallworth's precinct, who threatens Ture and gropes Patrice.After the rally, Stallworth is reassigned to the intelligence division. After reading about a local division of the Ku Klux Klan in the newspaper, he calls posing as white and speaks with Walter Breachway, the president of the Colorado Springs chapter. Stallworth recruits his Jewish coworker, Flip Zimmerman, to act as him to meet the Klan members. Zimmerman meets Walter, the more reckless Felix Kendrickson, and Ivanhoe, who cryptically refers to an upcoming attack.Calling Klan headquarters in Louisiana to expedite his membership, Stallworth begins regular phone conversations with Grand Wizard David Duke. Kendrickson suspects Zimmerman of being Jewish and tries to make him take a polygraph test at gunpoint, but Stallworth breaks the Kendricksons' kitchen window to distract them. Stallworth begins dating Patrice, but does not tell her that he is a police officer. After passing information to the Army CID about active duty members, he learns from an FBI agent that two members are personnel stationed at NORAD.Duke visits Colorado Springs for Stallworth's induction into the Klan. Over the real Stallworth's protests, he is assigned to a protection detail for Duke. After Zimmerman, masquerading as Stallworth, is initiated, Felix's wife Connie leaves the ceremony to place a bomb at a civil rights rally. Stallworth realizes her intentions and alerts local police officers. When Connie notices a heavy police presence at the rally, she goes to plant the bomb at Patrice's house instead, which was the pre-arranged Plan B. When she is unable to fit the bomb in her mailbox, she puts it on Patrice's car instead. Stallworth tackles her as she tries to flee, but uniformed officers detain and beat him despite his protests that he is working undercover.Bombmaker Walker recognizes Zimmerman from a prior arrest. He, Felix and Ivanhoe arrive and trigger the bomb, not realizing where Connie hid it, and are killed in the explosion. Zimmerman arrives and frees Stallworth, and Connie is arrested. While celebrating the closed case that night, Stallworth wears a hidden microphone and tricks a drunken Landers into bragging about his assault on Patrice. Landers is arrested.Police Chief Bridges congratulates the team for their success, but orders them to destroy the records. Stallworth receives a call from Duke, and he reveals to Duke that he is black before hanging up. While Patrice and Stallworth discuss their future, they are interrupted by a knock on the door. Through the window, they see a flaming cross on a hillside surrounded by Klan members.