Hi there! First time posting, so I will do my best to follow the rules and not cause the mods any grief (any errors are due to ignorance :P).
Background:
Alsace-Lorraine was a province of France since it had been acquired by Louis XIV in the 17th century and was later expanded by Louis XV. It was in a critical area between France and the Holy Roman Empire and thus was often strategically important in military conflicts involving France and its eastern neighbors.
But our story starts much later, during the Franco-Prussian War of 1870, when Otto von Bismarck strove to unite Germany under Protestant Prussian leadership. This could be a thesis on its own on how and why he did this, but the short of it is that he provoked the French Emperor Napoleon III to declare war on him to unite the German states in a common defense and demonstrate the power of the Prussian military.
And the Prussian military did not fail him, winning a stunningly decisive victory under the leadership of von Moltke the Elder (Prussian chief of staff) and having Wilhelm I acclaimed German Emperor in the Palace of Versailles (to rub French noses in it). But that was not all he wanted to do, he also now had to impose his terms on France. What he extracted was the predominantly German province of Alsace Lorraine from the newly formed French Third Republic on the grounds that it should fall under the domain of the "German Nation" rather than the "French" despite its long history under the latter. But we should be careful of buying this story wholesale. The powerful Prussian military establishment wanted to cripple France as one of the major powers. The degree to which Bismarck agreed with them on this point is debatable, and I will admit I have not seen primary sources that have resolved it one way or another. But they most certainly got there way with the Treaty of Frankfurt. France was forced to pay a massive five billion franc indemnity (which unlike the Germans after the Treaty of Versailles, the French would actually pay) and was forced to surrender their industrial heartland, the rich mining country of Alsace Lorraine to the newly formed German Empire.
German Alsace-Lorraine:
So German-speaking territory annexed into new German Empire, we gucci right? Well not quite. The thing is that you can pretty clearly see the issues from the get go as for about twenty years, Alsace Lorraine would send only "protest" candidates to the Reichstag, contesting the terms of their annexation. And even after that, these "protest candidates" would continue to win significant support. So what gives?
Well to begin with, about tens of thousands of people chose to maintain their French citizenship and were forced to leave the territory, which wreaked havoc on the economy. But more importantly, it is easy to overemphasize the importance of nationalism in this situation. The Alsatians spoke a native Almennaic dialect, not specifically "proper German." They also were completely content to code-switch and incorporate French into their everyday communications, even if their official language and interactions with other parts of their population were in French. Unfortunately, I am not a linguist or a cultural historian, so I am going to have to leave this here, as I muddled through the German I needed to study war documents and can't comment further (hopefully there is someone around who can explain this further if needed though). In addition, Alsatians had a significant catholic population, which directly conflicted with the protestant domination that Bismarck and Wilhelm I envisioned in their new German Empire.
But the kicker here was overall pretty simple. Alsace-Lorraine had gone from the fairly liberal, commerce-friendly Second French Empire to the authoritarian, conservative, and militaristic German Empire. While there may have been conflicts between different language groups prior to 1871, we really don't have much evidence for that and indeed even after annexation the Germans initially tolerated French language. However, the German Empire was a federal state (areas like Bavaria had incredible local freedom and maintained their own heads of state) but Alsace-Lorraine lost huge amounts of autonomy after its annexation. It would be governed directly from Berlin, as the Prussian military establishment, concerned both with border security with France and maintaining its grip in the region, did not want to allow its position to falter. So while things were calm on the surface, there was plenty of underlying tension around to deal with.
And things would definitely start to get heated as we approach the First World War. The Saverne Affair is the most prominent example, where a Prussian military officer used slurs against the Alsatian population and stated that his soldiers should feel free to use force in the area if they wanted to. During the resulting protests, several violent encounters occurred between the Prussian Army and the local population which served to inflame tensions in the area as well as the Reichstag, as the military establishment protected there own and the local representatives were pretty much powerless.
Things really only became worse when war broke out as the government began to crack down on the use of French language both in official form and in day to day conversation. The German military heavily distrusted Alsatians and particularly French-speakers and tightened their grip on the region overall.
However, the area also experienced the same breakdown of basic services and order as Germany collapsed at the end of the war. Most notably, the revolutions in Germany affected Alsace-Lorraine and Marxist partisans formed their own revolutionary assemblies. In the face of this, the leader of the Socialist Party in the Alsatian assembly declared that the authority of the German Empire was void and requested that the French Army intervene to occupy the area. The arrival of French troops to begin their military occupation marked the end of German rule of Alsace Lorraine.
(This is gonna require two parts, sorry team!!)