1580s, "Chinese official," via Portuguese mandarim or older Dutch mandorijn from Malay (Austronesian) mantri, from Hindi mantri "councilor, minister of state," from Sanskrit mantri, nominative of mantrin- "adviser," from mantra "counsel," from PIE root *men- (1) "to think." Form influenced in Portuguese by mandar "to command, order."
Used generically for the several grades of Chinese officials; the Chinese equivalent is kwan "public servant." Sense of "chief dialect of Chinese" (spoken by officials and educated people and generally in the northern, central, and western provinces and Manchuria) 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.