Africans were used in their militaries and some even ruled kingdoms like in Bangladesh. There's an old thread here about this btw
It's not exactly 'rulership' as in they were sovereign monarchs who answered to nobody. Most of the Indian subcontinent around 400 years ago operated under a system of vassalage, where the Mughal emperor in Shahjahanabad appointed Nawabs to take care of business in further off areas. The subcontinent is a very large place stretching from Afghanistan to Burma and all the way down to Sri Lanka. Until modern technology it was not practical for one person to rule it all. But that impracticality didn't stop dudes from wanting to invade and take over places, they just wouldn't or couldn't stick around and govern their new takings. That's where Nawabs and Nizams and Sultans came in.
So basically, the emperor is not fukked looking after the day to day of an area under his command (perhaps because it's too far away from the capital) so he sends somebody he likes to be the Nawab of that area, and they handle the administration of that territory, and kick up a certain percentage of the loot every year back to the emperor. And that shyt is hereditary too, so your son will be the next Nawab and he will continue to kick up to the new emperor. As long as the money keeps flowing and you nominally recognise the emperor as your boss, you're free to do as you please.
It's a very different model from the Roman empire for example, where the big homie in Rome called the shots everywhere.
Sometimes Nawabs became powerful enough that they could say 'fukk you
' to Shahjahanabad and become genuine rulers who answered to nobody. This became especially common after the mid-1750s, by which time the Mughal Empire was in disarray and decline. The Nizam of Hyderabad for example told the Mughal's he wasn't no vassal
So anyway, there were a couple of Siddhi Nawabs. Basically the only requirement was you did something good to get the attention and favour of the emperor, and also if you were Muslim that was a massive leg-up too.