In Greek mythology, Troilius is a Trojan prince and one of the many sons of Priam. In medieval and Renaissance versions of the legend of the Trojan War, Troilus falls in love with Cressida, whose father has defected to the Greeks because he can foresee the sack and genocide of Troy. Cressida pledges her love to him, but when she is returned to the Greeks in a hostage exchange, she loses hope, and winds up with the Greek hero Diomedes.
The best-known versions of Troilus's story are Chaucer's Troilus and Criseyde and Shakespeare's Troilus and Cressida. The medieval character is based on the Greek mythological figure. In the medieval story, Achilles later falls in love with Polyxena. During a truce, Achilles is killed visiting her. In Greek mythology Troilius is first mentioned in the epic Trojan War Cycle (c.8-700BC) in a part which is no longer extant called the Kypria (in Greek) or Cypria (in Latin). Homer's Iliad forms another part of this Trojan Cycle. Although the Kypria does not survive, we do have an ancient summary of the contents by Proclus who in fragment 1 mentions that Achilles killed Troilus, but provides no more detail. The text is available at . The Kypria is our earliest surviving literary information on Troilus.
Troilus was the son of Apollo from Hecuba, wife of King Priam of Troy. In one myth about Troilos, an oracle prophesies that Troy will not be defeated as long as Troilus reaches the age of twenty alive. Achilles, however, ambushes him and his sister, Polyxena, who escapes. Troilus takes refuge inside the temple of Apollo Timbraeus. The hero slays Troilius on the altar. When the Trojan heroes, too late, ride to the rescue, he whirls the head by the hair and hurls it at them. This affront to the god - killing his son and desecrating the temple - has been conjectured as the cause of Apollo's enmity towards Achilles, which culminates in his helping Paris kill Achilles.
Ancient Greek art as found in Greek pottery often depicts the scene of Polyxena and Troilius at the well while Achilles lies in wait for them.  Another myth about Troilius is found in the Iliad (book 24 line 257), which merely states that Achilles killed Troilius in battle. The 5th century BC tragedian, Sophocles, composed a tragic drama called Troilos which unfortunately only survives in a fragmentary form.