The origin of Chinese New Year is too old to be traced.
Several explanations are popular.
Legend has it that the beast Nian would swallow a great many people with one bite and thus frighten everyone. One day, an old man was able to subdue Nian with some persuasive talk. The old man disappeared riding the beast and turned out to be an immortal god. Before the old man left, he told people to put up red paper decorations on windows and doors at each year's end to scare away Nian in case the beast were to sneak back again, because red is the color the beast fears most. The custom of putting up red paper and firing firecrackers is to scare away Nian, should the beast run loose again.