Lenin and Hitler were allies until 1941, when Hitler became paranoid and decided he couldn’t trust Lenin not turn on him and made a pre-emptive attack. The communists that Hitler killed were that Trotskyites, the same ones that Lenin was purging. The Trotskyites were less statist and more socialist.
I think you mean stain, lenin died in 1924
Lenin had a series of strokes which left him a gibbering idiot in the early 20's. He was isolated by Stalin and died - or was murdered - leaving the way clear for Comrade Stalin to maneuver and assume sole power shortly afterwards. The Molotov-Ribbentrop pact was the alliance between Nazis and Bolsheviks (sworn enemies to that point) you referred to that divided Poland (and the Baltics) as a spoil of war and lasted from 1939 to June of '41.
They have always been two sides of the same beast.