mandarin (n.) Look up mandarin at Dictionary.com
"Chinese official," 1580s, via Portuguese mandarim or older Dutch mandorijn from Malay mantri, from Hindi mantri "councilor, minister of state," from Sanskrit mantri, nominative of mantrin- "advisor," from mantra "counsel," from PIE root *men- "to think" (see mind (n.)).

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. Transferred sense of "important person" attested by 1907. The type of small, deep-colored orange so called from 1771, from resemblance of its color to that of robes worn by mandarins.