Hey,
this is a question that comes up every now and again. You might find the answers you seek in previous in-depth answers:
Why did the Nazi's call themselves "Socialist" when they were cleary not? by /u/G0dwinsLawyer
and The Nazis refered to themselves as socialists, but also spoke of their struggle against marxism. How did they distinguish their beliefs from the Soviets? Was it just thinly veiled xenophobia? by /u/kieslowskifan .