To prepare for his role as Charles Xavier, James McAvoy shaved his head. He soon learned that the filmmakers wanted Xavier to have a full head of hair in the prequel. Throughout the first month of filming McAvoy had to wear hair extensions. He finally shaved his head for X-Men: Apocalypse (2016).
The film was originally to be a prequel about Magneto. Screenwriter Sheldon Turner wrote a treatment which he described as "X-Men (2000) meets The Pianist (2002)": the story focused on Magneto's early years as a prisoner of war in a Nazi concentration camp, until liberation by a squad of Allied Forces led by Charles Xavier. They later meet after the war and become friends, and later become rivals. The studio decided to change the film's direction to the early years of the X-Men, but incorporated aspects of Turner's script into the film.
Stan Lee does not make a cameo in this film. He was unable to participate because "they shot it too far away."
Colin Firth and Kevin Bacon were Matthew Vaughn's top two choices to play Sebastian Shaw, since he always wanted to see either of them play a villain. The studio felt there were already too many Brits in the cast, so the role went to Bacon. Vaughn later cast Firth in Kingsman: The Secret Service (2014) and Kingsman: The Golden Circle (2017), based on the comic book originally published by Marvel.
To prepare for his role as Erik Lehnsherr, Michael Fassbender studied Sir Ian McKellen's performance as Lehnsherr in the previous X-Men films, but also looked through the comics, as he decided to make his own version of Magneto: "You want to respect what someone else has done, especially because the fan base really liked what Ian has done with it. But, while I could have gone and studied him as a young man and brought that to the performance, I don't think (Director) Matthew [Vaughn] is very interested in that. So I'm just going my own way and working with whatever is in the comic books and the script."