The Star Wars actor plays a police officer in the “Red, White and Blue” episode of the BBC One series.
His real-life character, Leroy Logan, was an anti-racism reformer in the 1980s. Boyega plays the cop as he attempts to improve the police force from within after his father was assaulted by two officers.
One scene takes place in a police changing room, where Leroy finds racist graffiti on his locker.
“I don't remember filming that scene," Boyega told Radio Times. “I just remember fuming and being angry.”
He added: “I didn’t see the locker room or the locker door until those cameras were rolling. So that reaction was all natural to the character and the choices I thought he would make.”
In the same interview, Boyega recalled the time his Pentecostal minister father was stopped by police on his way home from church.
“Everybody knows, especially if you grew up in Peckham, somebody who's gone through the darkest scenarios with the police,” he said. “I do. I know a few people.”
Small Axe begins on Sunday 15 November with “Mangrove”, a film starring Letitia Wright about the trial of a group of black activists accused of inciting a riot at a protest in 1970.