There are many versions of this folk story. I am summarizing one that gives the order to the animals in the 12 year cycle. It goes a bit like this …
The Jade Emperor made a decree that the years on the calendar would be named for animals. There could only be twelve animals that would receive this honor so the Jade Emperor called a meeting and would award a year to the first twelve animals to arrive at his palace. The animals would have to cross a great river before reaching the throne of the Jade Emperor. The rat and the cat were the worst swimmers in the animal kingdom but they were very intelligent. They came up with a plan … they would hop on the back of the gentle Ox who agreed to swim them across the river. When Ox was in the deepest part of the river Rat pushed Cat into the water. Just as Ox neared land Rat jumped off Ox’s nose and reached shore first. The Jade emperor gave Rat first place in the race and zodiac.
Ox came ashore and claimed second place with Tiger right behind him to claim third. Rabbit made it across by jumping from rock to rock and claimed fourth place. Fifth place was awarded to the flying Dragon. Though not an animal the dragon pleased the Jade Emperor by bringing rain to the people of the kingdom so he was awarded his place in the zodiac cycle. At the sound of pounding hooves everyone looked to see the horse approaching quickly. Just before reaching the throne of the Jade Emperor the Snake, wrapped around the horses leg, loosed himself and scarred the horse so much that the horse kicked and bucked throwing the Snake to the throne and giving Snake the sixth place while Horse received the seventh.
Goat, Monkey and Rooster. These three animals worked together to cross the river and get to the palace. The Jade Emperor was very pleased with their teamwork and gave the Goat eighth place, Monkey ninth place and the Rooster tenth place.
The Dog was said to be the best swimmer in the animal kingdom but on the way he stopped to play by the water, chasing butterflies and rolling in the grass. Because of this he almost didn’t make it to the palace. The Dog was given eleventh place. Just when the sun was setting and Jade Emperor was ready to sleep they all heard an oink, oink. It was a little Pig! The little Pig got hungry during the race and stopped for something to eat. After eating he fell asleep waking just in time to finish the race before sunset. The Pig was awarded twelfth place and the calendar was full.