|Chinese Lucky Knot Cookies with the character "Fu". The one in the middle is inverted.|
I googled for more information and here's what I learned
A long, long time ago, in ancient China, a servant was putting up the character "Fu" (福) on the door in a rich man's dwelling to herald the arrival of the Spring Festival. However, this servant was illiterate and did not know the word "Fu". He inadvertently placed the character upside down on the door. This made the master of the house very angry and he wanted to give the poor servant a good whooping. Just then, another quick-thinking servant told the master that the occurrence must have been a sign of prosperity "arriving" upon his household. His words calmed the master and in fact, made him very happy. Now, why then did the servant say that?
That's because the Chinese are big on homophones and the character for "inverted" (倒) nearly sounds the same as "Dao" (到) meaning "arrive". Therefore, the phrase an "upside-down Fú" sounds nearly identical to the phrase "Good Fortune Arrives".
From then on, "Fu" is pasted upside-down on all doors in every household as the inverted "Fu" translates into a wish for prosperity to descend upon a dwelling.
Another interesting version to share.
It is said that the emperor Zhu Yuanzhang once used the character "Fu" as a cryptic code when he marked someone to be killed.
One such person who knew too many secrets about the royal court was on the emperor's hit list.The assassin was to kill that person with the indication of a character “Fu” hung on his door.
The kindhearted wife of the emperor, Empress Ma, could not bear to kill people and she worried that the insistence of their killing people would lead to broad and severe repercussions.
To thwart her husband's plan, she gave everyone the order to hang the character “Fu” on their doors. Interestingly, an illiterate family hung the “Fu” upside down by mistake. Confused by the "Fu' on all the doors, the assassin was not able to identify his target. On hearing this, the emperor was enraged. In his fury, he ordered to kill the goof who hung the “Fu” upside down.
To avert the situation, the clever empress remarked that the inverted "Fu" had an interesting meaning “Fudao”(福倒) which was homophonous with that of “luck was on my side.” The Emperor was placated and the victim was spared.
Thus, besides praying for prosperity, the "Fu' is hung upside down in memory of the kind and wise Empress Ma.