Son of Pharaoh Ptolemy XII of Egypt (80–58 BCE and 55–51 BCE), he succeeded his father in the spring of 51 BCE as co-ruler of Egypt by his marriage to his older sister Cleopatra VII of Egypt (69–30 BCE). In October 50 BCE, Ptolemy XIII was promoted to senior ruler along with her, although the eunuch Pothinus acted as regent for him.
In the spring of 48 BCE, Ptolemy XIII and Pothinus attempted to depose Cleopatra VII due to her increasing status as Queen. Her face appeared on minted coins, for example, while Ptolemy XIII's name was omitted on all official documents. Ptolemy intended to become sole ruler with Pothinus acting as the power behind the throne.
Ptolemy XIII and Pothinus, along with another advisor, Theodotus of Chios and the general Achillas, managed to force Cleopatra to flee to Syria with her sister Arsinoe IV. In exile, Cleopatra organized her own army and, returning to Egypt, ignited civil war. Arsinoe VI, at this time, was allied with Cleopatra but, soon, would defect and claim the crown for herself.
At this time, the Roman general Pompey the Great, having just been defeated at Pharsalus by his rival Julius Caesar, came to Egypt seeking refuge. Pompey's time in the East during his successful campaigns in the 60's had led him to have a degree of influence in that region, especially in Egypt. Initially, Ptolemy accepted his request for refuge, as Pompey had been an ally of his father (Pompey had, after all, sent one of his clients, Aulus Gabinius, to restore Ptolemy's father to the throne in 55 BCE). However, when Ptolemy and his advisers realized that Caesar was pursuing him, Ptolemy had Pompey murdered by one of his former subordinates. In doing so, Ptolemy hoped to win the approval and favor of Caesar when that victorious general arrived in Egypt looking for Pompey.
When Caesar arrived, he was presented with the head of his deceased rival and former ally, but reportedly, instead of being pleased, reacted with disgust and ordered that Pompey's body be located and given a proper Roman funeral. Cleopatra VII proved more successful in winning Caesar's favor and became his lover, bearing him a son Caesarion. Caesar arranged the official return to the throne of Cleopatra VII, though she had never officially abdicated her marriage to Ptolemy XIII.
Still determined to depose Cleopatra VII, Ptolemy XIII allied himself with his sister Arsinoe IV. Jointly, they organized the factions of the army loyal to them against those loyal to Cleopatra VII and the relatively small part of his army that had accompanied Caesar to Egypt. The battle between the warring factions occurred in mid-December 48 BCE inside Alexandria itself , which suffered serious damage, including the burning of some of the buildings which comprised the Library of Alexandria.
The arrival of Roman reinforcements from Pergamum gave the victory to Caesar and Cleopatra VII, forcing Ptolemy XIII and Arsinoe IV to flee the city. Arsinoe was caught and sent as a prisoner to Rome (she was later assassinated under orders from Cleopatra VII). Ptolemy XIII reportedly was drowned on January 13, 47 BCE while attempting to cross the Nile. Whether he was attempting to flee or was seeking negotiations remains uncertain from sources of the time. Cleopatra VII remained the unchallenged ruler of Egypt following the conflict. With her death in 30 BCE the Ptolemaic line came to an end and Egypt was brought under Roman rule.
Jan 47 BCEPtolemy XIII is killed in action.