The Constellation Leo myth, otherwise known as the myth of Leo the lion, is one of the more confusing of the constellation myths. The story of this constellation is typically attributed to an ancient story of Hercules (Greek mythology) and his 12 trials.
In the first of his trials Hercules (Greek mythology) is tasked with finding and killing the Nemean Lion - an enormous and powerful lion whose hide is impenetrable. Hercules doesn't know this however and shoots the Nemean Lion with arrows, which do nothing but make it really, really mad.
Being Hercules (Greek mythology), he decides to make a mad dash at the Nemean Lion rather than run away. The lion runs into its cave, which has two entrances. Long story short, Hercules blocks off an entrance, rushes into the cave, hits the Nemean Lion over the head with his club hard enough to stun it, then proceeds to choke it to death with his bare hands.
In order to prove his victory, Hercules (Greek mythology) is supposed to bring the pelt of the Nemean Lion back to King Eurystheus. Hercules tries to cut the pelt off the lion's body before realizing that it's still impenetrable. After trying a few different tactics, he finally figures out that the only thing that can cut the skin of the Nemean Lion is its own claws. Eventually he is able to use the claws to skin the lion. He brings the pelt back to Eurystheus but ends up keeping it to use as his own personal armor.
This is where the story supposedly connects to the constellation Leo myth. It is repeatedly mentioned in different versions of this story that either Zeus (Greek mythology) or Hera (Greek mythology) decide at this point to create the Leo constellation. Why they do this doesn't seem to be either understood nor all that important to the mythographers. Most legends assume that this is done as an ode to Hercules, but if that is the case, why is the Nemean Lion the one that ascends to the stars, which is typically reserved as an honor?
From what I have gathered, the best explanation is this:
Hera (Greek mythology) has essentially played "Godmother" to most of Greek myth's great monsters, including the Nemean Lion. It was Hera who first begged Gaia and Tartarus to create the god/monster Typhon, who happens to be the Nemean Lion's father. Some legends say that Hera or Selene the moon goddess (Greek mythology) had nursed the Nemean Lion, but regardless of whether or not you take that literally, Hera has connections to the Nemean Lion more so than Zeus. Plus, the Nemean Lion is named as such because Hera, angry at Zeus, sent it to Nemea to live, where there just so happens to be a shrine to Zeus. Thus anyone wanting to worship Zeus would have to get through a gigantic, almost indestructible lion first.
That said, it makes sense that Hera (Greek mythology), who sent the Lion to Nemea in the first place, took pity on the creature (or perhaps felt guilty) for it getting hunted down and killed and allowed it to live amongst the stars, next to Selene, the moon goddess, who adored him.
Though the story of Hercules (Greek mythology) and the Nemean Lion is by far the most popular, there are a couple of other possible explanations to the constellation Leo myth.
The Leo constellation is connected in almost every way to the sun. In the zodiac, Leo is a fire sign and represents those born in the summer months. In ancient times, the constellation lined up almost perfectly with the summer solstice. Leo's brightest star, Regulus, was often called the "Red Flame" and was thought to contribute to the heat of summer.
If we go across the sea to Egypt, we can see a different take on the constellation Leo myth. The Egyptians also recognized the Leo constellation and it's champion star, Regulus. In Egypt, though, the constellation had more to do with the river Nile than with a mythical beast.
It's not entirely clear where the Egyptians believed the constellation to have come from directly, but the lion in Egypt is represented as an important animal to the livelihood of the Egyptians. Basically, the Egyptians relied on the Nile river to flood every year and nurture the land for the harvest. During the summer months, the heat in the desert would be so great that the lions of the plains would move closer to the Nile to stay cool and have access to water. This coincided with the river's yearly inundation - an event so crucial to the survival of the Egyptians that festivals were held to the gods regularly in hopes that the inundation would be good. Statues depicting lion heads can be found along building by the Nile.
One other story, which I won't get into too much because it's really not related, is basically the precursor to "Romeo and Juliet", where two star-crossed lovers (Pyramus and Thisbe) decide to run off together, starting with a meeting by a mulberry tree. When the girl gets there, she sees a lion and runs off, dropping her scarf. The guy shows up, thinks that the lion killed his love, so he kills himself. She shows up, sees him dead, and kills herself.
Supposedly, Leo is the lion and the veil is next to it as the constellation Coma Berenices. The problem with this story is that Coma Berenices was invented by a priest under Ptolemy III by taking stars from what was already the tail of Leo. Since other mentions of the constellation Leo myth happen before the creation of Coma Berenices (which was around 240 B.C.), this story is a very unlikely candidate for Leo mythology (though it did wonders for Shakespeare's career).