This is quite an important story, part of the creation cycle called the Popol Vuh.
Hunahpu and his brother were conceived when their mother Xquic spoke with the decapitated head of their father Hun Hunahpu. The skull spat upon the maiden's hand, which caused the twins to be conceived in her womb. Xquic sought out Hun Hunahpu's mother, who begrudgingly took her as a ward after setting up a number of trials to prove her identity.
Even after birth, Hunahpu and Xbalanque were not well treated by their grandmother or their older half- brothers, One Howler Monkey and One Artisan. Immediately after their births, their grandmother demanded they be removed from the house for their crying, and their elder brothers obliged by placing them on an anthill and among the brambles. Their intent was to kill their younger half-brothers out of jealousy and spite, for the older pair had long been revered as fine artisans and thinkers, and feared the newcomers would steal from the attention they received.
The attempts to kill the young twins after birth were a failure, and the boys grew up without any obvious spite for their ill-natured older siblings. During their younger years, the twins were made to labor, going to hunt birds which they brought back for meals. The elder brothers were given their food to eat first, in spite of the fact they spent the day singing and playing while the younger twins were working.
Hunahpu and Xbalanque demonstrated their wit at a young age in dealing with their older half brothers. One day the pair returned from the field without any birds to eat, and were questioned by their older siblings. The younger boys claimed that they had indeed shot several birds but that they had gotten caught high in a tree and were unable to retrieve them. The older brothers were brought to the tree and climbed up to get the birds, when the tree suddenly began to grow even taller, and the older brothers were caught. This is also the first instance in which the twins demonstrate supernatural powers, or perhaps simply the blessings of the greater gods; the feats of power are often only indirectly attributed to the pair.
Hunahpu further humiliated his older brethren by instructing them to remove their pants and tie them about their waists in an attempt to climb down. The pants became tails, and the brothers were transformed into monkeys. When their grandmother was informed that the older boys had not been harmed, she demanded they be allowed to return. When they did come back to the home, their grandmother was unable to contain her laughter at their appearance, and the disfigured brothers ran away in shame.
At a point in their lives not specified in the Popol Vuh, the twins were approached by the god Huracan regarding an arrogant god named Seven Macaw (Vucub Caquix). Seven Macaw had built up a following of worshippers among some of the inhabitants of the Earth, making false claims to be either the sun or the moon. Seven Macaw was also extremely vain, adorning himself with metal ornaments in his wings and a set of false teeth made of gemstones.
In a first attempt to dispatch the vain god, the twins attempted to sneak upon him as he was eating his meal in a tree, and shot at his jaw with a blowgun. Seven Macaw was knocked from his tree but only wounded, and as Hunahpu attempted to escape, his arm was grabbed by the god and torn off.
In spite of their initial failure, the twins again demonstrated their clever nature in formulating a plan for Seven Macaw's defeat. Invoking a pair of gods disguised as grandparents, the twins instructed the invoked gods to approach Seven Macaw and negotiate for the return of Hunahpu's arm. In doing so, the "grandparents" indicated they were but a poor family, making a living as doctors and dentists and attempting to care for their orphaned grandchildren. Upon hearing this Seven Macaw requested that his teeth be fixed since they had been shot and knocked loose by the blowgun, and his eyes cured (it is not specifically said what ailed his eyes). In doing so the grandparents replaced his jeweled teeth with white corn, and plucked the ornaments he had about his eyes, leaving the god destitute of his former greatness. Having fallen, Seven Macaw died, presumably of shame.
Seven Macaw's sons, Zipacna and Cabrakan, inherited a large part of their father's arrogance, claiming to be the creators and destroyers of mountains, respectively. The elder son Zipacna was destroyed when the twins tricked him with the lure of a fake crab, burying him beneath a mountain in the process. The Maya god Huracan again implored the young twins for help in dealing with Seven Macaw's younger son, Cabrakan, the Earthquake. Again it was primarily through their cleverness that the pair were able to bring about the downfall of their enemy, having sought him out and then using his very arrogance against him; they told the story of a great mountain they had encountered that kept growing and growing. Cabrakan prided himself as the one to bring down the mountains, and upon hearing such a tale, he predictably demanded to be shown the mountain. Hunahpu and Xbalanque obliged, leading Cabrakan toward the non-existent mountain. Being skilled hunters, they shot down several birds along the way, roasting them over fires and playing upon Cabrakan's hunger. When he asked for some meat, he was given a bird that had been prepared with plaster and gypsum, apparently a poison to the god. Upon eating it, he was weakened, and the boys were able to bind him and cast him into a hole in the earth, burying him forever.
Some time after the expulsion of their older siblings, the twins used their special powers or abilities to expedite their gardening chores for their grandmother - a single swing of the axe would do a full day's worth of clearing, for example. The pair covered themselves in dust and wood chippings when their grandmother approached to make it seem they had been hard at work, in spite of the fact they spent the whole day relaxing. However the next day they returned to find their work undone by the animals of the forest. Upon completion of their work, they hid and lay in wait, and when the animals returned they attempted to catch or scare them off.
Most animals eluded their capture. The rabbit and the deer they caught by the tail, but these tails broke off, thus giving all future generations of rabbits and deer short tails. The rat, however, they did capture, singeing his tail over the fire in revenge for the act. In exchange for mercy, the rat revealed an important piece of information: the gaming equipment of their father and uncle was hidden by their grandmother in her grief, for it was playing ball that was directly responsible for the deaths of her sons. Again a ruse was devised to get their equipment, the twins once more relying upon trickery to meet their goals. The pair sneaked the rat into their home during dinner, and had their grandmother cook a meal of hot chili sauce. They demanded water for their meal, which their grandmother went to retrieve. The jar of water, however, had been sabotaged with a hole, and she was unable to return with the water. When their mother left to find out why and the pair were alone in the home, they sent the rat up into the roof to gnaw apart the ropes that held the equipment hidden, and were able to retrieve the equipment their father and uncle had used to play ball. It had long been a favorite pastime for their father, and soon would become a favored activity for them, as well.
Hunahpu and Xbalanque played ball in the same court that their father and his brother had played in long before them. When One Hunahpu and his brother had played, the noise had disturbed the Lords of Xibalba, rulers of the Maya Underworld. The Xibalbans summoned them to play ball in their own court. Doing so was a trap, however, as the Xibalbans used a bladed ball which was used to kill and decapitate the young men for disturbing their peace.
When the twins began to play ball in the court, once again the Lords of Xibalba were disturbed by the racket, and sent summons to the boys to come to Xibalba and play in their court. Fearing they would suffer the same fate, their grandmother relayed the message only indirectly, telling it to a louse which was hidden in a toad's mouth, which was in turn hidden in the belly of a snake in a falcon. Nevertheless the boys did receive the message, and much to their grandmother's dismay, set off to Xibalba.
When their father had answered the summons, he and his brother were met with a number of challenges along the way which served to confuse and embarrass them before their arrival, but the younger twins would not fall victim to the same tricks. They sent a mosquito ahead of them to bite at the Lords and uncover which were real and which were simply mannequins, as well as uncovering their identities. When they arrived at Xibalba they were easily able to identify which were the real Lords of Xibalba and address them by name. They also turned down the Lords' invitation to sit upon a bench for visitors, correctly identifying the bench as a heated stone for cooking. Frustrated by the twins' ability to see through their traps, they sent the boys away to the Dark House, the first of several deadly tests devised by the Xibalbans. Their father One Hunahpu and his brother had suffered embarrassing defeats in each of the tests, but again Hunahpu and Xbalanque demonstrated their prowess by outwitting the Xibalbans on the first of the tests, surviving the night in the pitch black house without using up their torch. Dismayed, the Xibalbans bypassed the remaining tests and invited the boys directly to the game. The twins knew that the Xibalbans used a special ball that had a blade with which to kill them, and instead of falling for the trick Hunahpu stopped the ball with a racquet and spied the blades. Complaining that they had been summoned only to be killed, Hunahpu and Xbalanque threatened to leave the game.
As a compromise, the Lords of Xibalba allowed the boys to use their own rubber ball, and a long and proper game ensued. In the end the twins allowed the Xibalbans to win the game, but this was again a part of their ruse. They were sent to Razor House, the second deadly test of Xibalba, filled with knives that moved of their own accord. The twins however spoke to the knives and convinced them to stop, thereby ruining the test. They also sent leafcutting ants to retrieve petals from the gardens of Xibalba, a reward to be offered to the Lords for their victory. The Lords had intentionally chosen a reward they thought impossible, for the flowers were well guarded, but the guards did not take notice of the ants, and were killed for their inability to guard the flowers. The twins played a rematch with the Xibalbans and lost by intent again, and were sent to Cold House, the next test. This test they defeated, as well. In turn, Hunahpu and Xbalanque by purpose lost their ballgames so that they might be sent to the remaining tests, Jaguar House, Fire House, Bat House and in turn defeat the tests of the Xibalbans. The Lords of Xibalba were dismayed at the twins success, until the twins were placed in Bat House. Though they hid inside their blowguns from the deadly bats, Hunahpu peeked out to see if daylight had come, and was decapitated by a bat.
The Xibalbans were overjoyed that Hunahpu had been defeated. Xbalanque summoned the beasts of the field, however, and fashioned a replacement head for Hunahpu. Though his original head was used as the ball for the next day's game, the twins were able to surreptitiously substitute a squash or a gourd for the ball, retrieving Hunahpu's real head and resulting in an embarrassing defeat for the Xibalbans.
Embarrassed by their defeat the Xibalbans still sought to destroy the twins. They had a great oven constructed and once again summoned the boys, intending to trick them into the oven and to their deaths. The twins realized that the Lords had intended this ruse to be the end of them, but nevertheless they allowed themselves to be burned in the oven, killed and ground into dust and bones. The Xibalbans were elated at the apparent demise of the twins, and cast their remnants into a river. This was, however, a part of the plan devised by the boys, and when cast into the river their bodies regenerated, first as a pair of catfish, and then as a pair of young boys again.
Not recognizing them, the boys were allowed to remain among the Xibalbans. Tales of their transformation from catfish spread, as well as tales of their dances and the way they entertained the people of Xibalba. They performed a number of miracles, setting fire to homes and then bringing them back whole from the ashes, sacrificing one another and rising from the dead. When the Lords of Xibalba heard the tale, they summoned the pair to their court to entertain them, demanding to see such miracles in action.
The boys answered the summons, and volunteered to entertain the Lords at no cost. Their identities remained secret for the moment, claiming to be orphans and vagabonds, and the Lords were none the wiser. They went through their gamut of miracles, slaying a dog and bringing it back from the dead, causing the Lords' house to burn around them while the inhabitants were unharmed, and then bringing the house back from the ashes. In a climactic performance, Xbalanque cut Hunahpu apart and offered him as a sacrifice, only to have the older brother rise once again from the dead.
Enthralled by the performance, One Death and Seven Death, the highest lords of Xibalba, demanded that the miracle be performed upon them. The twins obliged by killing and offering the lords as a sacrifice, but predictably did not bring them back from the dead. The twins then shocked the Xibalbans by revealing their identities as Hunahpu and Xbalanque, sons of One Hunahpu whom they had slain years ago along with their uncle Seven Hunahpu. The Xibalbans despaired, confessed to the crimes of killing the brothers years ago, a nd begged for mercy. As a punishment for their crimes, the realm of Xibalba was no longer to be a place of greatness, and the Xibalbans would no longer receive offerings from the people who walked on the Earth above. All of Xibalba had effectively been defeated.
With Xibalba defeated and the arrogant gods disposed of, Hunahpu and Xbalanque had one final act to accomplish. They returned to the Xibalban ballcourt and retrieved the buried remains of their father, One Hunahpu, and attempted to rebuild him. Although his body was made whole again he was not the same, and was unable to function as he once did. The twins left their father there in the ballcourt, but before doing so told him that he would be prayed to by those who sought hope, and this eased his heart. Then finished, the pair departed Xibalba and climbed back up to the surface of the Earth. They did not stop there, however, and continued climbing straight on up into the sky. One became the Sun, the other became the Moon.