The story
Derived from the early instances of advance fee scams in which the perpetrator of the scam would send potential victims an email claiming to be a Nigerian prince seeking to transfer a large amount of money into their country.
Etymology from Wiktionary, CC BY-SA 4.0.