After centuries of division into warring states, China was united in 221 BCE, under the short-lived Qin and then the long-lived Han dynasties. Just a few years later, in 209 BCE, the nomads of the steppe north of China were united under the Xiongnu confederation.
China, like Rome, provides an instance of empire formation along a metaethnic frontier between civilized and barbarian peoples. But it also differs from the Roman case. The Roman frontier kept pushing into barbarian territory for many centuries. The descendants of Asterix and Obelisk would eventually forget their identity as Gauls, and become Romans.
But in the Far East, the steppe north of China would not support agriculture, and the people who lived there would continue their nomad way of life and retain a separate ethnic identity. For centuries after 221 BCE, China held off the barbarians by a combination of military measures (notably of course the Great Wall) and bribery (poorly disguised as “gifts” from Emperor to subject). The Xiongnu held together as a centralized state because their ruler managed the flow of trade and tribute from China. In effect, Qin/Han and Xiongnu were “mirror empires,” facing off across the line between Sown and Steppe.