Yes, the Huns did invade parts of China during the 4th and 5th centuries AD. The Huns were a nomadic group originally from Central Asia, and they were known for their military prowess and swift horse-riding tactics.
One of the most notable encounters occurred under the leadership of Attila the Hun, although he is more commonly associated with invasions in Europe. Prior to Attila, the Huns made significant advances into northern China, particularly during the time of the Northern Wei dynasty. They engaged in various military campaigns, often clashing with Chinese states, causing instability and pushing the boundaries of the Chinese territories.
Historians have noted that the Huns were part of larger migrations and invasions by various nomadic groups that pressed against China’s northern borders, leading to improvements in the Great Wall and changes in military strategy. The incursions did not lead to a permanent occupation of Chinese territory, but they certainly impacted the dynamics of power in the region.