Commentary :
The Prophet (blessings and peace of Allah be upon him) instructed the Muslim to obey those in authority with regard to what is right and proper, but not what is wrong and sinful, because of the serious bad consequences that result from rebelling against them. And he (blessings and peace of Allah be upon him) warned against disobedience to those in authority and creating division among the Muslims.
This hadith highlights that, as the Prophet (blessings and peace of Allah be upon him) said: “Hear and obey, even if the one appointed over you is an Ethiopian with a head like a raisin.” In other words, if the one who is appointed to rule you is a man from Ethiopia with a head like a raisin – referring to his black colour and curly hair; this serves to point out that people would usually scorn such a person. What is meant is that the believer must obey the ruler and whomever the ruler appoints in charge of his affairs (as a governor, for example), no matter what his race or colour, so long as he rules the people in accordance with the Book of Allah (may He be exalted), as is mentioned in another report in Sahih Muslim. That is, so long as he adheres to Islam and calls the people to the Book of Allah (may He be exalted), regardless of what he looks like, his level of religious commitment and his manners, provided that he does not enjoin the people to disobey Allah (may He be glorified and exalted)..