Given that he spent time in prison, for the Nazi's unsuccessful "Beer Hall Putsch" in the German state of Bavaria. During his time in jail he famously wrote Mein Kampf, it is known that not everything he did was legal.
Of course that's not the period during Mr. Hitler's life that Dr. King intended to refe :)
You'll also have to define under which law. Under the terms of surrender of the Versaille Accords, the remilitarisation of Germany was certainly not legal, though it was intended to as much as possible be performed within the letter of the surrender document (e.g. the He-111 bomber was nominally a passenger and cargo aircraft for Lufthansa.)
As we know, Germany was not allowed to have a military air force under the terms of the Versialles Treaty, so many aircraft were being built under strict secrecy, often under the guise of Lufthansa Airlines. The He 111 was no exception. The Luftwaffe had requested that a large commercial airliner be constructed way back in 1934, but it should be designed in such a way that it could be easily and cheaply converted into a bomber adhering to German military specifications.
Same was true with other systems, like tanks, which were explicitly designed to stay within the letter of the treaty text.
In 1933, the Heereswaffenamt ordered the development of Kleintraktor – an armored vehicle between 4 and 7 tons in weight. It was designated La.S (Landwirtschaftlicher Schlepper / LaS – agricultural tractor) to hide its true purpose from the Treaty of Versailles
Again, a military system officially designed as a civilian one to circumvent the treaty.
The rest is from memory, based on my reading of The Rise and Fall of the Third Reich by William Shirer (good book)
Hitler and the NSDAP gained power legally, then used subterfuge to force a situation in which they could institute emergency measures (think Reichstag fire), effectively meaning an end to the Weimar Republic and its laws.
From that moment on of course, they made the law so anything they did was effectively legal.
And that's no doubt what Dr. King meant. When someone with absolute power wants to do harm, whatever he does is by definition legal as there is no law left under which he can be held liable.