Méhul probably met Duval, an ex-soldier and actor, at the salon of Sophie Gay and suggested composing an opera on the Biblical story of Joseph (). In writing "Joseph", Méhul and his librettist may have been trying to exploit the contemporary vogue for operas on religious themes and the French fascination for Egypt after Napoleon's expedition to the country in 1798. Duval was directly inspired by Pierre Baour-Lormian's verse tragedy , which had appeared in September 1806.