There are many known examples with completely different meanings of the same Chinese characters between in Japanese and in Chinese. I have been a little surprised by knowing the meaning of “鬼” in Chinese. Below I will try to explain the difference.
In Chinese, the most closest translation of “鬼” should be the ghost. But in Japanese, “鬼” is a terrifying humanoid creature with unknown powers. He has horns on his head, full of fear, and wears tiger-style underwear.
The Lunar New Year in February is still a considerable event in China. But in Japan, the beginning of the year has been completely moved to Gregorian New Year except for the event of Setsubun節分 which means the seasonal turning day.
Every Japanese child knows what to do on that day. We sprinkle the roasted soybeans at home, chanting “鬼 please get out of here, and happiness please come in.” As the result, a spring safely comes.
Another famous story in Japan about 鬼 is Momotaro. This is an ancient story that also every child in Japan knows. A boy was born out of the peaches that flowed out of the river. When he grew up, he went to fight 鬼 with a dog, a monkey and a wild turkey. The manga “Demon Slayer 鬼滅の刃” that fascinated the Japanese young people seems to be based on the ancient story.
The dead ancestors, the gods, come back from the other world on the seasonal turning days. Because they are responsible for all aspects of our lives, such as agriculturally good results and natural disasters of floods or earthquakes, people used to greet them politely such as decorating everywhere and drinking together. This is probably the prototype of 鬼, because I can feel something in common with the present meaning in Chinese.
However, probably in Japan, meaning of 鬼 has changed by only the terrible part of the gods being emphasized until today.