- "According to legend, a huntsman once tracked a lion that was terrorizing its village all the way to its den. Though armed with only a spear, the man managed to kill both the lion and its mate, but spared the cubs. This mercy so pleased the Old Gods that they sent a shaft of sunlight deep into the cave, gleaming off golden walls. The hunter became a miner and built a ringfort to guard his new wealth. Nobody ever asks what happened to the cubs. Maybe the gods forgot about them and they starved. Maybe there never were any cubs or lions or hunter, doesn't matter. Someone found enough gold in that cave to buy whatever truth he wanted, along with a castle that he'd name after his new family: Casterly Rock."
- ―Jaime Lannister
According to legend, the huntsman tracked a lion that was terrorizing his village to a cave on the coast. He killed both the lion and its mate, but spared the cubs. This pleased the Old Gods, and they sent a beam of sunlight deep into the cave, turning the stone walls to gold. He began mining the gold, and built a fort at the top of the mountain at which the gold mine was buried under. This fort would become a castle, and it would be known as Casterly Rock - named after the huntsman's new house, House Casterly. With his new wealth and power, he ruled the Westerlands from his new home, and so did his descendants for hundreds of years until the castle was swindled from them by Lann the Clever.
In the books
In the book continuity, the huntsman was named "Corlos", and was the son of a man named Caster, whom he named his house for. Virtually nothing about him is different in the show continuity, other than his name, the fact that Maester Yandel wrote about him, and that he came from a village near to where Lannisport would later be built.