Producer Maria Bello visited Benin in West Africa to research the Agojie, and returned to the US, convinced she had found a great movie pitch. The project then stayed in development hell for years, first at STX (which only offered $5 million for the budget), then at TriStar. Only after the massive success of Black Panther (2018) was the film greenlit with a $50 million budget.
While the Agojie are very much real--they existed for over a century--they also have inspired plenty of interpretations in pop culture, perhaps most notably the Dora Milaje in Black Panther.
The actors trained for four months before shooting to get in shape for the action sequences: every day, they would lift weights for 90 minutes, and then trained for three and a half hours with a stunt coordinator, where they learned martial arts, how to use swords and spears, and did some cardio.
In the film, Nanisca confronts Ghezo about the immorality of selling black slaves to the Portuguese and suggests trading in palm oil production instead. While this conversation is fictional, it is based on the historic fact that the Dahomey an Agojie needed to start trading palm oil with the Europeans between 1840 to 1870 because Europe was already beginning to outlaw slavery. The change was necessary for trade not because of a moral awakening surrounding the immorality of selling other Africans into slavery. Eventually this led to Dahomey's two political parties becoming polarized about what to trade when slavery became less profitable outside Africa.
The film's title comes from the fact that the people of Dahomey believed in a legend of two kings, a man and a woman who are exact equals, and Nanisca is expected to be crowned a Woman King, hence why the film isn't simply called "The Queen" or something similar.