The series is created by David Jenkins, who also serves as the showrunner. Garrett Basch and Dan Halsted have co-written the series with Jenkins.
It is loosely based on the true adventures of Stede Bonnet (Darby), a pampered aristocrat who abandoned his life of privilege to become a pirate.
Waititi, who will also direct the pilot episode and serve as executive producer on the show, will be playing the role of one of the most feared and revered pirates, Blackbeard.
Nairn will portray Wee John Feeney, a pirate on the show, HBO Max said in a statement.
Also joining the cast of ''Our Flag Means Death'' are actors Nathan Foad as Lucius, Samson Kayo as Oluwande, Rory Kinnear as Captain Nigel Badminton and Chauncey Badminton, Con O’Neill as Izzy and Vico Ortiz as Bonifacia.
Nairn, who hails from Northern Ireland, has films such as ''The Appearance'' and ''Robin Hood: The Rebellion'' to his credits.