John Malalas, a Sixth Century chronicler from Antioch, is apparently the sole source for the story of how Diocletian's horse saved the residents of Alexandria from mass slaughter.
As you may know, the great Roman emperor Diocletian restored the Roman Empire after the Crisis of the Third Century almost destroyed it the mid-Third Century. He was acclaimed emperor by the eastern army in late 384 and ruled (first alone, then later with other members of the Tetrarchy until his retirement in 305.
Early in the year 297, the Roman province of Egypt exploded in revolt. Although the revolt may have been triggered by fears of anticipated tax increases following the announcement of a new census, there was reason to believe that it was coordinated by or with the Sassanid (Persian) Empire, Rome's dangerous enemy to the east. In 296 a powerful Sassanid army under its expansionist king Narses had invaded into the areas of modern day Turkey and Syria. In early 297 – just about the time of the Egyptian uprising – the Persian army defeated a Roman army led by Diocletian's colleague Galerius near Carrhae (where the Persians had annihilated a Roman army under Crassus 350 years earlier). The revolt appeared to be part of a treasonous conspiracy to aid the Persians by opening a second front requiring the diversion of Roman troops. (The fact that Manicheans were believed to have spearheaded this fifth column may have contributed to the later decision to persecute the similar-looking Christian sect.)
Leaving Galerius and the bulk of the army to deal with the Sassanids, Diocletian rushed with a detachment of troops to Egypt in the spring of 297 to stamp out the rebellion. He ultimately did so, but it was not a walk in the park for the entire province was in revolt. While largely reducing other areas and towns to submission by the end of 297, during the late summer or early fall Diocletian laid siege to Alexandria. With almost one million residents, second in size only to the city of Rome itself, the provincial capital was well prepared. The city stubbornly resisted for eight months, reportedly falling only in the spring of 298.
The ends of sieges in the ancient world were rarely pretty affairs. From Troy on, the rule of thumb was that, if the besieged city did not capitulate early on, when the end came all of the inhabitants were killed or enslaved. Consistent with this tradition, and convinced that the revolt represented a treasonous conspiracy with Rome's mortal enemy to destroy the empire, when Alexandria fell Diocletian issued orders that so much blood should be shed that his horse might go knee-deep in it.
Now, however, the gods intervened to save the Alexandrians. As Diocletian approached the city gate his steed stumbled over a corpse, falling to its knees, which were stained red with the gore. Recognizing the omen, Diocletian ordered that the slaughter be stopped, no doubt to the great disappointment of his men.
In the ensuing celebrations the grateful Alexandrians displayed a sardonic sense of humor. They are said to have erected a bronze statue of Diocletian's horse in the city in honor of their savior.