Both meanings involve biting and holding fast — a mordant dye bites into fabric, and mordant wit bites into its target.
Sharply caustic or biting in thought, manner, or style; or as a noun, a chemical that fixes dye to fabric.
From French mordant meaning biting, present participle of mordre meaning to bite, from Latin mordēre meaning to bite Key roots: *merd- (Proto-Indo-European: "to bite, rub away").