As we bandy around the word “mojo”, its origins in African ritual aren’t necessarily uppermost in our mind.
The wiki article makes a useful introduction. In African-American Hoodoo, mojo is among many terms for a protective amulet consisting of a flannel bag containing magical items, deriving from Islamic practices of West and Central Africa. In West Africa a generic term is juju bags. The gris-gris pouch of the Mandingo spread from West Africa via slavery to the southern States and Haiti, fusing with African-American Christianity (and making a link with Native American cultures). In the 1930s mojo bags were part of Zora Neale Hurston‘s ethnographic research. See also America over the water.

Mulatto ex-slave in her house near Greensboro, Alabama, 1941 (wiki). Caption:
African-American women sewed charms and mojo hands into their quilts for spiritual protection. Newspaper is placed on the walls to ward off evil spirits.

Minkisi, Kongo/Central Africa (World Museum, Liverpool) (wiki). Caption:
Minkisi cloth bundles were found on slave plantations in the United States in the Deep South.
Minkisi bundles influenced the creation of mojo bags in Hoodoo.
* * *

Since the 20th century, the word spread in American culture in movies and songs, coming to refer to sexuality and virility, and more broadly to motivation in general. It became a theme of blues, such as
- Muddy Waters, Got my mojo working:
- and Junior Wells, Hoodoo man blues:
Little did I realise that Bo Dudley’s “Mama’s got a brand new bag, gonna groove it the whole night long” had such a pedigree.