Vietnam was originally spelled as two words, Viet Nam. Việt Nam is a variation of Nam Việt (Southern Việt), a name that can be traced back to the Triệu dynasty (2nd century BC). The word “Việt” originated as a shortened form of Bách Việt, a word used to refer to a people who lived in what is now southern China in ancient times.

Source: https://en.wikipedia.org/wiki/Names_of_Vietnam