Burgundy takes its name from the Burgundians who founded the Kingdom of Burgundy, which was then divided in two and became the Kingdom of the Two-Burgundies the Duchy of Burgundy (to the west) and the County of Burgundy (to the east) during the Carolingian time.
During the Middle Ages, the Duchy of Burgundy (to the west) and the County of Burgundy (to the east) were set apart. The Duchy of Burgundy (now called "Franche-Comté" which means "Free County") belonged to the Holy Roman Empire. The County of Burgundy belonged to the Kingdom of France and was made of the counties of Mâcon, Chalon, Sens, Auxerre, Tonnerre, Nevers, and Autun.
So, the dukes of Burgundy were vassals of the King of France for the duchies of Burgundy, Artois and Flanders, and vassals of the Emperor for the counties of Burgundy, Gueldre, Hainaut, Brabant and other territories.