An estimated 1.4 million Czech soldiers fought in World War I, of whom some 150,000 died. More than 90,000 Czech volunteers formed the Czechoslovak Legions in France, Italy and Russia, where they fought against the Central Powers and later against Bolshevik troops. In 1918, during the collapse of the Habsburg Empire at the end of World War I, the independent republic of Czechoslovakia, which joined the winning Allied powers, was created. This new country incorporated the Bohemian Crown (Bohemia, Moravia and Silesia) and parts of the Kingdom of Hungary (Slovakia and the Carpathian Ruthenia) with significant German, Hungarian, Polish and Ruthenian speaking minorities.

In 1929 compared to 1913, the gross domestic product increased by 52% and industrial production by 41%. In 1938 Czechoslovakia held a 10th place in the world industrial production.

Although Czechoslovakia was a unitary state, it provided what were at the time rather extensive rights to its minorities and remained the only democracy in this part of Europe in the interwar period. The effects of the Great Depression including high unemployment and massive propaganda from Nazi Germany, however, resulted in discontent and strong support among ethnic Germans for a break from Czechoslovakia.

Adolf Hitler took advantage of this opportunity and, using Konrad Henlein's separatist Sudeten German Party, gained the largely German speaking Sudetenland (and its substantial Maginot Line-like border fortifications) through the 1938 Munich Agreement (signed by Nazi Germany, France, Britain and Italy). Czechoslovakia was not invited to the conference and felt betrayed by the United Kingdom and France, so Czechs and Slovaks call the Munich Agreement the Munich Betrayal because the military alliance Czechoslovakia had with France and Britain proved useless.

Despite the mobilization of 1.2 million-strong Czechoslovak army and the Franco-Czech military alliance. Poland annexed the Zaolzie area around Český Těšín. Hungary gained parts of Slovakia and the Subcarpathian Rus as a result of the First Vienna Award in November 1938. The remainders of Slovakia and the Subcarpathian Rus gained greater autonomy, with the state renamed to "Czecho-Slovakia". After Nazi Germany threatened to annex part of Slovakia, allowing the remaining regions to be partitioned by Hungary and Poland, Slovakia chose to maintain its national and territorial integrity, seceding from Czecho-Slovakia in March 1939, and allying itself, as demanded by Germany, with Hitler's coalition.

The remaining Czech territory was occupied by Germany, which transformed it into the so-called Protectorate of Bohemia and Moravia. The protectorate was proclaimed part of the Third Reich, and the president and prime minister were subordinate to the Nazi Germany's Reichsprotektor ("imperial protector"). Subcarpathian Rus declared independence as the Republic of Carpatho-Ukraine on 15 March 1939 but was invaded by Hungary the same day and formally annexed the next day. Approximately 345,000 Czechoslovak citizens, including 277,000 Jews, were killed or executed while hundreds of thousands of others were sent to prisons and concentration camps or used as forced labour. Up to two-thirds of the citizens were in groups targeted by the Nazis for deportation or death. A Nazi concentration camp existed at Terezín, north of Prague.

There was a strong Czech resistance to Nazi occupation, both at home and abroad, most notably with the assassination of Nazi German leader Reinhard Heydrich by Czechoslovakian soldiers Jozef Gabčík and Jan Kubiš in a Prague suburb on 27 May 1942. The Czechoslovak government-in-exile and its army fighting against the Germans were acknowledged by the Allies; Czech/Czechoslovak troops fought from the very beginning of the war in Poland, France, the UK, North Africa, the Middle East and the Soviet Union. The German occupation ended on 9 May 1945, with the arrival of the Soviet and American armies and the Prague uprising. An estimated 140,000 Soviet soldiers died in liberating Czechoslovakia from German rule.

In 1945–1946, almost the entire German minority in Czechoslovakia, about 3 million people, were expelled to Germany and Austria. During this time, thousands of Germans were held in prisons and detention camps or used as forced labour. In the summer of 1945, there were several massacres. The only Germans not expelled were some 250,000 who had been active in the resistance against the Nazi Germans or were considered economically important, though many of these emigrated later. Following a Soviet-organised referendum, the Subcarpathian Rus never returned under Czechoslovak rule but became part of the Ukrainian Soviet Socialist Republic, as the Zakarpattia Oblast in 1946.

Czechoslovakia uneasily tried to play the role of a "bridge" between the West and East. However, the Communist Party of Czechoslovakia rapidly increased in popularity, with a general disillusionment with the West, because of the pre-war Munich Agreement, and a favourable popular attitude towards the Soviet Union, because of the Soviets' role in liberating Czechoslovakia from German rule. In the 1946 elections, the Communists gained 38% of the votes and became the largest party in the Czechoslovak parliament. They formed a coalition government with other parties of the National Front and moved quickly to consolidate power. A significant change came in 1948 with coup d'état by the Communist Party. The Communist People's Militias secured control of key locations in Prague, and a single party government was formed.

For the next 41 years, Czechoslovakia was a Communist state within the Eastern Bloc. This period is characterized by lagging behind the West in almost every aspect of social and economic development. The country's GDP per capita fell from the level of neighboring Austria below that of Greece or Portugal in the 1980s. The Communist government completely nationalized the means of production and established a command economy. The economy grew rapidly during the 1950s but slowed down in the 1960s and 1970s and stagnated in the 1980s. The political climate was highly repressive during the 1950s, including numerous show trials and hundreds of thousands of political prisoners, but became more open and tolerant in the late 1960s, culminating in Alexander Dubček's leadership in the 1968 Prague Spring, which tried to create "socialism with a human face" and perhaps even introduce political pluralism. This was forcibly ended by invasion by all Warsaw Pact member countries with the exception of Romania and Albania on 21 August 1968.

The invasion was followed by a harsh program of "Normalization" in the late 1960s and the 1970s. Until 1989, the political establishment relied on censorship of the opposition. Dissidents published Charter 77 in 1977, and the first of a new wave of protests were seen in 1988. Between 1948 and 1989 more than 250,000 Czechs and Slovaks were sent to prison, and over 400,000 emigrated.