Pegasus is the last of a breed of winged horses that belonged to Zeus, Calibos had hunted them down and killed all of them. When Perseus witnesses Andromeda's astral image being taken to the marshes by the vulture of Calibos, he asks Ammon for help. Ammon tells him that "When the full moon shines in the water then they say Pegasus the last of the winged horses comes to drink."
Perseus then sets a trap to capture Pegasus in the place they called the "wells of the moon" and tame him. He uses his rope and captures him but the creature takes him on a wild ride around the night skies of Joppa. After a couple of minutes up in the air Perseus manages to tame the flying horse and with his help the next night he follows the vulture and arrives at the marshes to confront Calibos and get the answer of the riddle.
Some time later Pegasus is captured by the henchman of Calibos and is taken to the marshes and is unable to help Perseus. After the beheading of Medusa and the fight with Calibos and his giant scorpions at the edge of the underworld, Perseus with his very last breath asks Bubo to find and rescue Pegasus. Bubo arrives at the marshes and causes havoc as he topples down some of the torches that were used to light up the dark place causing a fire that scares the henchmen and the giant Vulture away. In the end Pegasus helps Perseus in the fight with the last of the Titans..the Kraken.
source: wikipedia.org