McGregor is set to portray the villainous Black Mask in the film, Deadline reported.
Black Mask is a Gotham City crime lord who is obsessive about masks. The character, real name Roman Sionis, is also the leader of the False Face Society gang.
Birds of Prey, from director Cathy Yan (Dead Pigs), will be a female-led, team up film that features Harley Quinn joining forces with Huntress (Mary Elizabeth Winstead) and Black Canary (Jurnee Smollett-Bell). Rosie Perez also stars as Gotham City detective Renee Montoya.
Birds of Prey is set to arrive in theaters on Feb. 7, 2020.