The Proto-Indo-European root *tḱeh₁- "to gain control of, gain power over" became Proto-Indo-Iranian *kṣayati "to own, control", as in Sanskrit क्षत्रिय kṣatriya, "a member of the military or reigning order (which in later times constituted the second caste)".
In Old Persian, *kṣayati became xšāyaθiya "king in the possession of the imperious power", then Persian شاه šāh, as in shah. The name Xerxes (Ξέρξης) is apparently the Greek form of xšaya-aršan- "ruling over men". (Old Persian and Avestan aršan "man" from PIE *ere-s- "to flow".)
šāh was also used in chess as a warning when the king was under attack - ie, "check". This was borrowed into Arabic, then into Old French as eschec, then Middle English as chek. This came to mean, among other things, "identifying token" in the 18th century, spelled check or cheque. None of my sources tell me what the Arabic word was or where the /k/ came from - but according to this dictionary, "cheque" is الصكّ al-ṣakk.
The Old French plural of eschec was esches, borrowed into Middle English as ches. So chess, check and cheque come from the same Old French word. And according to the Oxford Dictionary of English Etymology, French chèque was borrowed from English. So some borrowed words do get returned!