It's not what you might think.
According to my Supplement to the Oxford English Dictionary--not, perhaps, the ideal source for a word popularized by semiliterate blues musicians, but bear with me--mojo has two meanings: (1) a narcotic, especially morphine; or (2) "magic, the art of casting spells, [or] a charm or amulet used in such spells."
In the first sense mojo may derive from the Spanish mojar, to celebrate by drinking; in the second, from an African word, perhaps Gullah, moco, meaning witchcraft or magic.