Njinga received military and political training as a child, and she demonstrated an aptitude for defusing political crises as an ambassador to the Portuguese Empire. In 1624, she assumed power over Ndongo after the death of her brother Mbandi. She ruled during a period of rapid growth of the African slave trade and encroachment by the Portuguese Empire in South West Africa.
In 1641, she entered into an alliance with the Dutch West India Company who had captured Luanda from the Portuguese. Between 1641 and 1644, Njinga was able to reclaim large parts of Ndongo. Alongside the Dutch, she defeated the Portuguese in a number of battles but was unable to take the Fortress of Massangano. In 1648, the Portuguese recaptured Luanda, with the Dutch leaving Angola. Njinga continued to fight the Portuguese until a peace treaty was signed in 1656.
The Portuguese declared war on Ndongo in 1626 and by 1628, Njinga's army had been severely depleted and they went into exile. In search of allies, she married Imbangala warlord Kasanje. Using this new alliance to rebuild her forces, she conquered the Kingdom of Matamba from 1631 to 1635.