Anansi was terribly conceited after the whole affair of the ear of corn story. God found Anansi entertaining, but his bragging was really growing tiresome.
So God gave Anansi a empty sack and said, "I have something in mind; figure it out and bring it back to me in the sack."
Anansi asked questions, but God would give no further clues as to what that "something" might be. God sent the mortal on his way, saying that if he were only half as clever as he boasted he was, then he should have no problem figuring out what "something" God wanted.
Anansi was puzzled. How was he to know what God wanted in the sack? He left heaven and went down to Africa, where he had a meeting with the birds, explaining his predicament. The birds were sympathetic, but had no clues to offer.
However, each agreed to give Anansi one feather, enabling Anansi to fly. Anansi made these feathers into a beautiful cloak, and then flew up to heaven, where he perched in a tree next to God's house.
Some of the people of heaven saw this strange "bird" and began talking about it. They asked each other what kind of bird this might be. Even God himself did not recall making any sort of creature that looked like that.
One of those present suggested that, if Anansi were clever, he might know what sort of bird this was. Anansi, in the tree, heard all of this.
God's attendants were speaking among themselves when one said, "Good luck finding Anansi - God sent him on an impossible mission. How was Anansi to know that God wanted the sun and the moon brought to him in a sack?"
Overhearing this, Anansi went out to fetch the sun and the moon.
He went to the python, the wisest of all creatures on earth, and asked how one might capture the sun and the moon. The python advised him to go to the west, where the sun rests at night. The moon could be found in the east around the same time.
So Anansi gathered the sun and the moon, placed them in the sack, and took them to God.
God was so pleased with Anansi's ingenuity that he made Anansi his captain on earth.