The subject of was suggested to Tchaikovsky by his friend Konstantin Shilovsky in 1875, after the composer had rejected outright Shilovsky's previous libretto The Reluctant Queen (Царица поневоле), which was also set in ancient Egypt. The manuscript libretto is dated "1875", but the earliest reference to the opera in Tchaikovsky's correspondence appears in a letter of 10/22 February 1876 to his brother Modest, in which he wrote that "I'm wavering between Ephraim and Francesca, although I think the latter takes precedence" .
Although Tchaikovsky made notes on the manuscript of Shilovsky's libretto, he soon rejected it in favour of other possible subjects, including Francesca da Rimini and Othello. On 14/26 June 1876 he told Shilovsky that he would not be using his libretto for the time being , although some months later he suggested the subject to Sergey Taneyev, who also went on to reject it .
Konstantin Shilovsky's story was set in Ancient Egypt:
The goddess Taozer is in love with a Jewish youth Ephraim, a guard at the Pharaoh's palace. But Ephraim is betrothed to Leah, and he rejects the advances of Taozer, who is humiliated. The Pharaoh is in love with Taozer, and asks her to be his bride. Taozer agrees, but only as a ploy to take her revenge on Ephraim. She invites Ephraim, Leah and her mother Deborah to celebrate their forthcoming marriage. During the celebrations, she serves Leah with a goblet containing a sleeping potion, but Ephraim believes she has been murdered. Taozer promises to revive her, if Ephraim will spend just one night with her. Later that night, Ephraim meets Taozer in the palace garden. He pleads with her to renounce her claim on him, and bring Leah back to life. They are overheard by the Pharaoh, who has been brought to the garden by Deborah. When the Pharaoh realises that Taozer has deceived him, he murders her, revives Leah, and rewards Ephraim for his fidelity. The action takes place at the time of the Egyptian enslavement of the Israeli people .