The Soviet Union began World War II with a non-aggression pact with Nazi Germany, the Molotov–Ribbentrop Pact, signed on 23 August 1939. About the book: https://www.amazon.com/gp/product/1591148065/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1591148065&linkCode=as2&tag=ub066-20&linkId=117ec22e751fecb594e97dcead8621df
In addition to stipulations of non-aggression, the treaty included a secret protocol that divided territories of Romania, Poland, Lithuania, Latvia, Estonia and Finland into German and Soviet "spheres of influence", anticipating potential "territorial and political rearrangements" of these countries. Stalin and Hitler later traded proposals for a Soviet entry into the Axis Pact.
Germany invaded Poland on 1 September 1939, and Joseph Stalin ordered his own invasion of Poland on 17 September. Part of southeastern (Karelia) and Salla region in Finland were annexed by the Soviet Union after the Winter War. This was followed by Soviet annexations of Estonia, Latvia, Lithuania, and parts of Romania (Bessarabia, Northern Bukovina and the Hertza region). It was only in 1989 that the Soviet Union admitted the existence of the secret protocol of the Nazi-Soviet pact regarding the planned divisions of these territories.
In June 1941, Hitler launched an invasion of the Soviet Union, prior to which Stalin had ignored reports of a German invasion. Stalin was confident that the total Allied war machine would eventually stop Germany, and the Soviets stopped the Wehrmacht some 30 kilometers from Moscow. Over the next four years, the Soviet Union repulsed German offensives, such as at the Battle of Stalingrad and Battle of Kursk, and pressed forward to victory in large Soviet offensives such as the Vistula-Oder Offensive. Stalin began to listen to his generals more after Kursk.
The bulk of Soviet fighting took place on the Eastern Front—including a continued war with Finland—but it also invaded Iran (August 1941) in cooperation with the British and late in the war attacked Japan (August 1945).
Stalin met with Winston Churchill and Franklin D. Roosevelt at the Tehran Conference and began to discuss a two-front war against Germany and future of Europe after the war. Berlin finally fell in April 1945, but Stalin was never fully convinced his nemesis Adolf Hitler had committed suicide.
Fending off the German invasion and pressing to victory in the East required a tremendous sacrifice by the Soviet Union, which suffered the highest military casualties in the war, losing approximately 20 million men.
Stalin became personally involved with questionable tactics employed during the war, including the Katyn massacre, Order No. 270, Order No. 227 and NKVD prisoner massacres. Controversy also surrounds rapes and looting in Soviet-held territory, along with large numbers of deaths of POWs held by the Soviets, and the Soviets' abusive treatment of their own soldiers who had been held in German POW camps.
Viktor Suvorov suggested that Stalin had made aggressive preparations beginning in the late 1930s and was preparing to invade Germany in the summer 1941. He believes that Hitler forestalled Stalin and the German invasion was in essence a pre-emptive strike, precisely as Hitler claimed. This theory was supported by Igor Bunich, Joachim Hoffmann, Mikhail Meltyukhov (see Stalin's Missed Chance) and Edvard Radzinsky (see Stalin: The First In-Depth Biography Based on Explosive New Documents from Russia's Secret Archives). Other historians, especially Gabriel Gorodetsky and David Glantz, reject this thesis. General Fedor von Boch's diary says that the Abwehr fully expected a Soviet attack against German forces in Poland no later than 1942.
In the initial hours after the German attack began, Stalin hesitated, wanting to ensure that the German attack was sanctioned by Hitler, rather than the unauthorized action of a rogue general. Accounts by Nikita Khrushchev and Anastas Mikoyan claim that, after the invasion, Stalin retreated to his dacha in despair for several days and did not participate in leadership decisions. But, some documentary evidence of orders given by Stalin contradicts these accounts, leading historians such as Roberts to speculate that Khrushchev's account is inaccurate.
Stalin soon quickly made himself a Marshal of the Soviet Union, then country's highest military rank and Supreme Commander in Chief of the Soviet Armed Forces aside from being Premier and General-Secretary of the ruling Communist Party of the Soviet Union that made him the leader of the nation, as well as the People's Commissar for Defense, which is equivalent to the U.S. Secretary of War in the at that time and the U.K. Minister of Defense and formed the State Defense Committee to coordinate military operations with himself also as Chairman. He chaired the Stavka, the highest defense organization of the country.