Pushkin began writing The Fountain of Bakhchisaray in the spring of 1821, after having visited The Fountain of Tears at the Khan Palace in Bakhchisaray in 1820. The bulk of the poem was written during 1822. In spring 1823, the entry draft was completed. During the autumn of 1823, the poem received its final finishing and was prepared for printing. The first edition of The Fountain of Bakhchisaray was published on March 10, 1824.
The poem has inspired multiple works. In 1899, composer Anton Arensky wrote a five-part cantata, including an aria of Zarema. In 1909-1910, a short film based on the poem was created by Yakov Protazanov. In 1934, Boris Asafyev created a ballet of the same name, also inspired by Pushkin's work, and Alexander Ilyinsky composed an opera (1911) based on the poem. Alexander von Zemlinsky's 1897 opera Sarema takes its name from a character in the poem, and is based upon it.