He was the son of Baldwin IV, Count of Flanders and his first wife Ogive of Luxembourg. She was a daughter of Frederick of Luxembourg, In 1028 Baldwin married Adèle of France She was the daughter of King Robert II of France. At her instigation he rebelled against his father, Baldwin IV, but in 1030 they were reconciled. When his father died in 1035 Baldwin succeeded him.