Introduction[]
In OTL, Adolf Hitler before 6th April 1936 actually liked Poland. He wanted to forge an alliance with Poland, ruled by authoritarian government of BBWR - Bezpartyjny Blok Współpracy z Rządem (Partyless Block of Cooperation with Government) with the prime minister being Ignacy Mościcki.
Hitler had a very specific plan about war. He remembered, that two-front war would only cause defeat, therefore, he wanted to fight on one front at time. In Hitler's plans, Reich would ally with Poland, thus securing his eastern flank, while Wehrmacht deals with western powers. After Benelux countries and France are defeated, and English forces are driven back to island, Hitler would turn his attention to Soviet Russia and attack them along with Polish army.
Polish HQ also considered this scenario and, oblivious to what government and Foreign Affairs were doing, Polish generals started to negotiate with Wehrmacht about specific details of plan. All leadership of strategic level (e.g. long-term campaign planning) was given to Germans, while tactical-level (division deployment, moves of single units) - to Polish officers. Even today, many historians and militarists agree, that Polish army (based on cavalry and infantry, ideal units for vast, flat terrain like Ukraine, or Western/Central Russia), given German technology and command, would crush Red Army (which at the time, after Stalin's officer purges, was disorganised, badly supplied and composed of uneducated and untrained infantry - their training was focused more on political indoctrination, than actual military training).
But back to the facts - Polish politicians were listening only to nationalist propaganda, based on old animosities between Poles and Germans and Foreign Affairs (under minister Józef Beck) listened to this propaganda too. Therefore, while Nazis were trying to get along with Warsaw, Poland did not share this will and tried to keep neutrality for all costs. Official statement was that if Poland ally with Third Reich, Poles would lose their honor and would deny its cultural heritage of opposing all German claims. Adolf Hitler claimed Danzig - but he was willing to give Poland even better economical conditions than League of Nations (Danzig was a Free City since 1918, under LoN tutelage). None the less, since 1933, Poland hadn't choose a specific position on German proposals of alliance, trying to be neutral. At the same time, UK and France got interested Polish and German relations, watching with uneasiness, how both sides get along with each other. Therefore, they tried to complicate the situation. In 6th April 1936, Great Britain send a guarantee of independence to Bulgaria and Poland. Bulgaria refused it.
Józef Beck with this proposal, was given an ultimatum - either he refuse it and will be forced to sign an alliance with Third Reich to ensure the security of eastern border; or accept it and see, what Hitler will do. He did the latter.
Hitler got furioused. After he calmed down, he ordered his Foreign Affairs minister, Joachim Ribbentrop, to start diplomatic relations with Soviets. Shortly after, a Ribbentrop-Molotov Pact was signed, which had a secret addendum, dividing Poland between Third Reich and USSR.
In 1st September 1939, Reich invaded Poland, in 17th Red Army crossed the Polish border. World War II has begun.
Alternate scenario[]
But what if things were just a little different? If Józef Beck cared not for honor, but rather for right of state?
Let's begin in 1933. President Paul von Hindenburg gives the position of Chancellor to Adolf Hitler, even more strenghtening NSDAP rule over Germany. Hitler immediately tries to enforce his warplan, specifically the part about Polish alliance. He meets a few times with Józef Piłsudski, a person not directly involved in government, but very influential none the less. Relations between Poland and Reich are getting very friendly.
Then the 6th April comes and Poland refuses British offer. Instead, Józef Beck visits Berlin and signs a treaty about mutual friendship and alliance, which later was called "Ribbentrop-Beck Pact". What the world was unaware of, the pact contained a secret addendum, which divided Soviet Union between Poland, Germany and Japan.
Following the previously developed plan, Wehrmacht issues an invasion of France via Belgium in 27th August 1939. Poland does not interfere, but secures western flank from Soviet attack. Netherlands, Belgium, Denmark, Luxemburg and France shortly after surrenders, while remaining Allied forces withdraw to British Isles through Dunkerque.
Having Western Europe under his control, Hitler now tranfers majority of his forces to Polish-Soviet border, preparing an invasion. Somewhere near 1940-41 invasion began. Whole Ukraine, Belarus and western Russia falls into Axis hands. Disorganised and lacking of supplies Red Army couldn't withstand joint Polish-German forces. Whole divisions surrenders to Axis troops, especially the ones composed with Belarussians and Ukrainians. Civilians greet Poles and Germans as a heroes and liberators.
Meanwhile, Stalin with his government locks themselves in Moscow, establishing fortifications and enforcing it with the remaining troops able to fight. An order is issued in the city - every man that can hold a gun, is obligated to join the defenders. Zhukov's and Rokossovski's armies are quickly withdrawing to Moscow.
Axis forces hastily pushes forward, to be greeted with artillery fire from the city. German general Gerd von Rundstedt orders a siege. Heavy armament is transferred under the Moscow, along with high-caliber artillery. An unstopping shell rain falls on the suburbs, causing victims and fires.
At the same time, Stalin orders a counteroffensive to break the siege. Zhukov and Rokossovski's forces (which stayed in the safe distance to city) are trying to flank the besiegers, but Polish cavalry under general Edward Śmigły-Rydz deals them a massive defeat. Shortly after the cavalry issues an assault on besieged Russians and, suffering heavy casualties, breaks Soviet defenses. Von Rundstedt notices that opportunity and orders another, even more stronger assault on newly open breach. Soon Axis troops start pillaging Kremlin. Stalin is found in his bunker dead - he shot himself, after killing his closest associates. Polish cavalrymen assaults the Lenin's Mausoleum. One of them cuts his head off and proceeds to march with it, stuck to a sabre, through whole city.
After Stalin's defeat, another document between allies is signed - a Yalta Pact. This documents states, that Belarus and Ukraine is given to Poland, which ensures partial autonomy of these lands. Central Russia and southern territories are given to Germany, which starts to enforce Lebensraum policy - resettling native Russians behind Caucasus Mountains and replacing them with German colonists. Eastern Asia (Manchuria, Siberia, Kamchatka, Mongolia) is granted to Japan. On the rest of former USSR, a puppet country is established - National-Socialist Republic of Russia.
But relations between Germany and Poland starts to worsen. Adolf Hitler is malcontent about Poland refusing the transfer of Polish Jews, for obvious reasons. Additionally, in the time of Eastern Campaign, some leadership argues between German and Polish officers were happening, not to mention dissent in Polish society, still quietly and passively opposing Nazi ideology, especially the part about eugenics and "übermensch/untermensch" theory.
Polish Chief of Staff issues order to create a backup plan for invasion on Germany. Everyone does not believe it will be necessary, but it's created none the less. Having fresh reinforcements in the form of Ukrainian and Belarussian manpower, and being allowed to study Nazi doctrines and technology, Poles quickly gain more advancements in military research, thus equipping their army with high-quality modern technology, e.g. radios, automatic rifles, early prototypes of night vision, better encryption techniques, and so on. At the end of 1942, Polish army is still weaker than Wehrmacht, but it don't need to cover as big territory as German army. Also, Poles does not have to deal with opposition on occupied territories, due to former friendship between Poles, Ukrainians and Belarussians, and official propaganda, which proclaimed, that a "Great Commonwealth is reborn". Nazis, because of their Lebensraum policy, had to face a very hard opposition from Russian people, not to mention the western Europe (for instance - La Resistance in France). Therefore, if the invasion plan was realised right then, Third Reich would likely to be defeated.
Polish government, faced upon these facts, starts to turn to Allies. Secret talks between Józef Beck and lord Halifax are initiated in December 1943, Lisboa, Portugal. In effect, a secret pact is forged stating, that in the contingency of Allied invasion in Europe, Poland would issue an invasion on German homeland, creating two fronts.
In the meantime, some French uprisings broke out, quickly pacified by Waffen-SS and Wehrmacht. All conspirators were captured by Gestapo, tortured, then either imprisoned or sent to gas chambers in concentration camps near Lyon, Tolouse, Bourges and Limoges.
Then the 6th June 1944 comes. D-Day, or officially speaking, Operation Neptune. American, British and French troops lands in Normandy, greeted with small resistance, as Wehrmacht was prepared for invasion in other places, more likely Italy (via British Egypt) or Bretagne. Immediately after, Poland breaks an alliance with Germany and issues an invasion both to the East and West. Wehrmacht in Russia is weakened by numerous uprisings and quickly surrenders, but in German borders the war stalled. Initially surprised, Nazis managed to resist the first strike and Poles have to wait for reinforcements from Asia to come. War on German-Polish border is indecisive until September, when armored divisions under General Maczek breaks the status quo and breaches German defenses. Soon after, Polish army floods the German homeland. Edward Śmigły-Rydz shakes hands with George Patton in Hanower on 12th February, 1945. Poles conquer Berlin on 22 December, 1944. Hitler is captured and forced to sign a capitulation act, initially before general Maczek, later before all Allied and Polish officials.
On the 6th and 9th of August, 1945, Americans dropped an atomic bombs over Hiroshima and Kokura. Japan is forced to surrender and the capitulation act is signed, ending World War II.
Poland comes out from war as one of global powers and along with Great Britain, France, USA and Italy, is one of founder countries of UN.