Quote:
"Chinese official," 1580s, via Port. mandarim or Du. mandorijn from Malay mantri, from Hindi mantri "councilor, minister of state," from Skt. mantri, nom. of mantrin- "advisor," from mantra "counsel," from PIE base *men- "to think" (see mind). Form influenced in Portuguese by mandar "to command, order." Used generically for the several grades of Chinese officials; sense of "chief dialect of Chinese" (spoken by officials and educated people) is from c.1600. The type of small, deep-colored orange so called from 1771, from resemblance of its color to that of robes worn by mandarins.
I may have to eat my words. Looks like it actually comes from the root verb "mandar" -