The story is set in the mid-17th century, when most of China is conquered by the Manchu-led Qing dynasty after the collapse of the Ming dynasty. Ming remnants have fled south and established a Southern Ming regime based in Fujian.