The Battle of Banquan took place sometime around 2500BCE, perhaps near modern day Yuncheng in Shanxi province. The battle was between the tribe led by the Yellow Emperor (Huangdi) and the Flame Emperor (Yandi).
The Chinese mythical hero Shennong, whose name literally means Divine Farmer taught farming as well as knowledge of herbs to the people. Shennong is considered to be amongst the Three Sovereigns known for imparting essential knowledge to mankind. It is believed that Shennong was the first of the Yan Emperors. The lineage lasted for perhaps more than 500 years from Shennong to the last Yan Emperor.
Yellow Emperor or Huangdi improved the lot of nomadic people by imparting knowledge of building shelter, taming of wild animals (he apparently tamed six special beasts, bear, brown bear, pi and xiu (Pixiu), Chu and tiger), building of carts, boats etc. He is also credited with growing of five Chinese cereals though some sources credits Shennong with this. He also invented Chinese calendar, astronomy, musical instruments, math calculations and also helped invention of Chinese character writing system.
The Yan emperor led his tribe in a campaign to conquer the nearby tribes who promptly turned to the Yellow Emperor for protection. Three battles were fought, last of which was the Battle of Banquan which resulted in the defeat and murder of the Yan Emperor and unification of the two tribes under the Yellow (Huang) Emperor. The new tribe was known as Yan Huang. Descendants of Yan and Yellow Emperor is a term to denote the Han Chinese people. The confederation of tribes was known as Huaxia which is an ancient term to refer to the Chinese civilization.
The fame of the Yellow Emperor led to the conflict with the tribe of Nine Li under Chi You. Chi You was some sort of supernatural creature who some believe was descendant of the Yandi (Yan Emperor). He could have been leader of an allied tribe of the Yan Emperor. He had 81 fierce brothers which may mean 81 allied clans. The resulting battle between the Yellow Emperor and Chi You was the Battle of Zhuolu.
During the battle, Chi You brought forth a thick fog which resulted in initial losses to the Huaxia. The Yellow Emperor then invented a South Pointing Chariot that helped orient the troops to the correct direction and brought them out of the fog. The South Pointing Chariot was a non-magnetic contraption. The chariot is first set up pointing towards South and then each twist and turn of chariot triggers a gear mechanism that keeps the pointer towards south. Chi You then brought down and ferocious storm. Yellow Emperor called upon her daughter, Nuba, a drought demon who dispelled the storm. Chi You was slain by Yinglong, the winged dragon.
Due to his ferocity in battle, Chi You was revered as the God of War. The tribes that were united under Chi You were dispersed or assimilated into the Huaxia tribes. Many Far Eastern people including the Koreans consider Chi You as their ancestor.
The Yellow Emperor thus established the primacy of the Huaxia tribe and laid the foundation of the Han Chinese civilization.