Qixi Festival originated from the legend of the cowherd and the weaver girl (Niulang and Zhinü)..
An oxherd Niulang with the help of his ox (the demoted cattle god) married a fairy, Zhinü, who became a weaver girl. Zhinü's mother, a goddess, returned Zhinü to heaven. Niulang pursued using the ox's hide. The goddess separated them by a river of stars (the Milky Way), but magpies were allowed to form a bridge for them to meet once a year (Qixi).