The background shown in both Codex: Space Marines (Haines and McNeill, 2004) and Codex: Chaos Space Marines (Chambers et al., 2002) states that the Chaos Marine Legions were nine of the twenty Legions of Space Marines who fought in the Great Crusade for the Imperium of Man.
The Legions have kept their old names, with the exception of the Sons of Horus who were renamed the Black Legion by their new leader, Abaddon the Despoiler.