The German-Polish Non-Aggression Pact (German: Deutsch-polnischer Nichtangriffspakt; Polish: Polsko-niemiecki pakt o nieagresji) was an international treaty between Nazi Germany and the Second Polish Republic that was signed on January 26, 1934. Both countries pledged to resolve their problems by bilateral negotiations and to forgo armed conflict for a period of 10 years. The pact effectively normalised relations between Poland and Germany, which had been strained by border disputes arising from the territorial settlement in the Treaty of Versailles. Germany effectively recognised Poland's borders and moved to end an economically-damaging customs war between the two countries that had taken place over the previous decade.
Before 1933, Poland had worried that some sort of alliance would take place between Germany and the Soviet Union to the detriment of Poland. Therefore, Poland made a military alliance with France. Because the Nazis and the Communists were bitter enemies of each other, a hostile Soviet-German alliance after Hitler came to power in 1933 seemed very unlikely.
One of the most noted of Józef Pi?sudski's foreign policies was his rumoured proposal to France to declare war on Germany after Adolf Hitler had come to power, in January 1933. Some historians speculate that Pi?sudski may have sounded out France on the possibility of joint military action against Germany, which had been openly rearming in violation of the Treaty of Versailles. France's refusal might have been one of the reasons that Poland signed the German-Polish Non-Aggression Pact. However, the argument that the pact had been forced on Pi?sudski by French refusal to wage a "preventive war" has been disputed by historians, who point out that there is no evidence in French or Polish diplomatic archives that such a proposal was ever advanced. They state that when in late October 1933, rumours of a Polish "preventive-war" proposal were reported in Paris, their source was the Polish embassy, which had informed French reporters that Poland had proposed a "preventive war" to France and Belgium, but Poland and Germany had already been secretly negotiating the pact. It has been argued that Pi?sudski had the Polish embassy start rumors about a "preventive war" to pressure the Germans, who were demanding for Poland to abrogate its 1921 Franco-Polish alliance. The pact would specifically exclude that alliance.
It has been said that Pi?sudski's reason for seeking the Pact with Germany was his concern over France's Maginot Line. Until 1929, French plans had called for a French offensive into the North German Plain, in conjunction with offensives from Poland and Czechoslovakia. The construction of the Maginot Line, which began in 1929, indicated the French Army's preference for a strictly-defensive stance, which would leave its eastern allies on their own. (That is exactly what happened in 1939 during the Phoney War.) From Pi?sudski's viewpoint, in the light of France's military plans, a non-aggression pact with Germany would be the best choice for Poland.
Pi?sudski used Hitler's rise to power and international isolation of Germany's new regime as an opportunity to reduce the risk that Poland would become the first victim of German aggression or of a great power especially the Four Power Pact. Germany's new rulers seemed to depart from the traditionally-Prussian orientation that was anti-Polish. Pi?sudski regarded the new chancellor as less dangerous than his immediate predecessors, such as Gustav Stresemann, and since he saw the Soviet Union as the greater threat, he opposed French and Czechoslovak efforts to include the Soviet Union in a common front against Germany.
The Poles insisted on stating that it did not nullify any previous international agreements, particularly the one with France. Nevertheless, by easing Poland's disputes with Germany bilaterally, the treaty weakened France's diplomatic position against Germany.
To allay any fears of a war against the Soviet Union, on May 5, 1934, Poland renewed the Soviet-Polish Non-Aggression Pact, which had been first signed on July 25, 1932. It was extended until December 31, 1945 despite Hitler's repeated suggestion to form a German-Polish alliance against the Soviets. 
Poland was able to maintain friendly relations with Germany for the next five years but also with France and Britain. However, that may have also led to inattentiveness in foreign policy about the activities of the crumbling League of Nations and ignoring the collective security schemes that had been proposed by French and Czechoslovakia in the early 1930s.
Pi?sudski distrusted German intentions on the whole but perceived Hitler's origins as an Austrian, rather than a Prussian, as a mitigating factor and stated that Hitler should stay in power as long as possible.
The pact has been seen as an instance of political weakness brought on by Pi?sudski's illness, and it was likened to the interwar lack of leadership that was displayed by Neville Chamberlain and Paul von Hindenburg.
German policy changed drastically in late 1938, after the annexation of Sudetenland sealed the fate of Czechoslovakia, and Poland became Hitler's next target. In October 1938, German Foreign Minister Joachim Ribbentrop presented Poland with the proposition of renewing the pact in exchange for allowing the Free City of Danzig to be annexed by Germany and the construction of an extraterritorial motorway and railway through the Polish Corridor, with Germany accepting Poland's postwar borders. Since Poland refused, Hitler rescinded the pact unilaterally on April 28, 1939 during an address before the Reichstag while Germany renewed its territorial claims in Poland. After another few months of rising tension and the Molotov-Ribbentrop Pact between Germany and the Soviet Union, which contained a secret protocol by which Hitler and Stalin agreed to divide Poland between them, Germany invaded Poland on September 1, 1939, which initiated World War II.