Hitler had a bad childhood. He was beaten by his father, he failed school and his dreams were crushed when an art academy in Vienna.
He started to develop hatred towards Jews after leaving school. This is because he lived as a virtual tramp with an anti-semitic mayor, Karl Lueger. He believed they ruined chances for him.
When WWI started, he actually fled Austrian conscription and moved to Bavaria, Munich to join the German army. He saw the war as a chance to unite all the Germanic people. He was awarded the iron cross for his bravery in the war.
However, he learned about their defeat in hospital after a gas wound. He believed in the Dolchstoss theory and blamed Jews (since most were bankers and handled the funds).
Hitler was so good in the army that he got additional service post war (most were just
disbanded). The problem is that he's assigned to spy on an extreme right wing group which Hitler seemed to be good at fitting into. Hitler left the army to take over the group and bring it to power. He introduced the SA (the private army), he introduced the swastika and changed the name to the National Socialist German Workers Party (formerly the German Workers party).
Hitler then realises that he needs to act fast if he wants to take over as a leader. By November 1923, Stresemann had stopped hyperinflation by introducing the Rentenmark as a new currency, ended passive resistance (improving relations with France) and had recently resigned from Chancellorship. This is obviously going to restore faith in the constitution. Stresemann had also began to crack down on extreme groups. Hitler really has no choice but to attack Berlin after his resignation from chancellor.
He launched an attack on the Burgerbraukeller in Munich. This was because it was hosting a meeting of 3,000 government officials. He orders the officials to march against the German officials whilst holding a gun to them. He and the SA announced exactly when and where they were going to execute this attack and left. The officials must have laughed after this. He had just leaked his own battle plan to people who wanted to keep the constitution. They simply told the police what would happen and Hitler was arrested for treason.
Hitler was sentenced to 5 years; the statutory minimum sentence for treason. The reason why is how Hitler manipulates his 'failure'. He uses the trial to get across his views. Whilst in prison, he has time to think his party's future clearly. Also, he realises they need to get voted in democratically (which they do). The sign of approval is when a ban on the Nazi party is lifted in 1925 and Hitler only serves 9 months in gaol (German prison) compared to the 5 years he was sentenced for.