A romanized borrowing of Japanese 忍者, popularized within Japanese by manga after World War II and in English by Eric Van Lustbader's 1980 novel The Ninja and the 1981 movie Enter the Ninja, of uncertain derivation but with an underlying sense of secret or hiddenperson.
The “Mongolian miner” sense arose from the supposed resemblance of the bowls used to wash ore with mercury to the shells of the Teenage Mutant Ninja Turtles.