In both world wars, the Germans were literally within sight of victory only to be turned back and ultimately defeated. They implemented the Schlieffen Plan and sprinted across France/Belgium only to be turned back a stone's throw away from Paris. They moved through western Russia with blinding speed only to be defeated at Moscow. Of course, the circumstances of these two battles are very complicated, but I have a hard time believing these two events are sheer coincidence. Is there a common thread that connects the two?
I want to start out saying this question frustrates me, and I want to put this as politely as possible. It's a tenuous comparison at best as really the only thing that can be compared are the results. One thing you need to understand is that Paris was not the objective in WWI and Moscow was not the making or breaking of the Eastern Front and certainly not as crucial of a battle as the Marne. I'm not really going to try and validate or crush your comparison, I'm just going to give you some context in my area of study and hopefully someone more learned in WW2 will 'finish off' what I started with an Osfront comparison.
To clear something up initially too, in WWI the Schlieffen Plan was never enacted in its original form or any officially drawn up form. Revising of the plan was the name of the game for the Germans. Now, the French were not being beaten as badly as you may imagine and certainly not as badly as the Russians. Both Holger and Tuchman make sure to emphasize that, despite the defeats the Germans were not achieving the same success they felt 40 years prior in the Franco-Prussian War. As Holger puts it, they were capturing too few men, too few guns, and counting too few dead. The French, although obsessed with the idea of the offensive throughout this period were performing a surprisingly orderly retreat. This is in comparison to what can only be described as a total crushing defeat of any Soviet operations 25+ years later.
The original Schlieffen Plan was already modified, some would say tainted. The original plan called for a breach of neutrality with the Netherlands as well to avoid the Belgian forts at Liege, a slow Russian mobilization, and a 7:1 ratio of men on the "right" flank (Belgium/North France) and the "left" (Alsace-Lorraine). Moltke recognized this plan to be a bit unfeasible with changing events, especially a rapidly modernizing Russia. He changed that ratio to his ideal of a 3:1 ratio, bringing more men to Lorraine and East Prussia. He also elected to not invade the Netherlands in fear of the British blockade. By having a neutral country not being blockaded, the Germans can get crucial war supplies through them.
What Moltke didn't do was adjust the timetable. Schlieffen and Moltke did not nor feel it at all necessary to address the fact that men can not march on foot 25-35 kilometers per day, while fighting, every single day. They also did not feel it perhaps necessary to address the fact that the Belgians and French might actually resist asymmetrically -- destroying their railroads and bridges. When you have a plan that is structured down to the hour and even minute at times, this becomes problematic. The Schlieffen Plan and the Schlieffen-Moltke Plan were both two idealized plans that would work in a perfect world, but only in a perfect world. As I mentioned before the Schlieffen Plan operated on a timetable -- roughly a 900-950 hour window to knock out the French to head East and deal with the Russian juggernaut.
This timetable would not be adjusted when he reduced the men from 7:1 to 3:1. By the time of the Marne, this number would be reduced to 1:1 with approximately 330,000 and 370,000 operating in the left and right flanks respectively. The piercing spear head was ground down to a dull poke. A single corps difference between the hammer and anvil. Some of this would come from attrition, but most would come from aforementioned revisions -- notably Moltke moving men from the North to the South to Crown Prince Rupprecht to perform offenses in Lorraine which would ultimately end in failure and to send men to East Prussia to bolster the forces against the Russians. The thing is, by the time they reached East Prussia, the Russians were routed.
This is where your comparison I guess begins to come in. Paris was not a war target anymore. It was heavily fortified and the Germans knew even a tiny force can take out forces magnitudes larger from previous experience at Liege and Nancy. The French army was, in their opinion, in total rout and thus elected to swing Southeast and try to force the entire French army into a pocket between the "left" and "right" and "center" flanks and crush them -- again rising their obsession with a Franco-Prussian War repeat.
The thing is, the Germans no longer had their super heavy artillery that served them so well early on. The railroads were destroyed that were necessary to move them. Their men were suffering from attrition having to march constantly and they could not reinforce and most of their reserves were sent to Lorraine or Prussia. The French, on the other hand, did not need railroads for their guns. Their light 75mm guns could be wheeled around by a few horses, through dirt and mud. They had full access to railroads which allowed them to take non-critical corps from the South and move them to the North via railroad. What was initially a 100 battalion and 175 artillery battery advantage in favor of the Germans would swing into a 200 battalion 190 artillery battery advantage in favor of the French.
So I suppose the 'common thread' as you put it was logistics. However, it was not some overall doctrine issue or an issue with the German psyche or that they are somehow connected in any way beyond that as far as I know. Most modern battles and wars are won and fought in the fields of logistics. Hell, most wars in history are won and lost by logistics.
You say that 'of course' the circumstances of the battles are complicated and, implying, different and just brush it off. Those circumstances are important and what make those battles and situations unique. The offensive in Northern France in 1914 was an "all or nothing" type of deal. Moscow was not as huge of a deal as you make it to be and the German strategy in Barbarossa was not as set in stone as the Russians. There was no big 'wing' in Barbarossa giving the 'deathblow', it was a natural and fluid staged invasion which is noticeably separate from what the Schlieffen-Moltke Plan. It also developed naturally as failures and success' occurred, while the Schlieffen-Moltke Plan collapsed under the weight of improvisation and petty infighting.
You can not just look at two completely different scenarios and say they had roughly the same result and say "welp, they're connected somehow because of something innate about their military tactics" or something of that nature. It's falling into one of my biggest pet peeve of history, trying to create 'one size fits all' models for certain peoples or events or issues. The two wars and the two situations are so different on so many levels I don't think it's fair at all to make your comparison in conclusion.
If you want more on context to the Marne in particular, Holger Herwig has an absolutely fantastic book titled The Marne, 1914: The Opening of World War I and the Battle That Changed the World. It's a recent book and it's very good at providing a lot of context to that battle. I've read through it once and about 3/4th's through it on my second pass and everything I read about it and the context leading up to it is not close at all to the narrative I've been presented about Operation Barbarossa and the context of the Eastern Front.
As /u/elos_ had already beautifully covered the WWI aspect to this question, allow me to tackle the WWII part.
The differences between the Schlieffen plan and the German plan to attack the Soviet Union are that the Schlieffen plan was an "all or nothing" plan. When the Germans failed outside Moscow Hitler simply said: (if you'll allow me to simply) we'll get then next year. So, the battle of the Marne which basically ended the Schlieffen plan, was far more important than Moscow was.
Now allow me to quote some parts of elos's post and show the differences between the two battles.
What Moltke didn't do was adjust the timetable
This is one of the biggest differences between the two campaigns. Hitler and the German high command were always willing to alter their plan to give it the best possible success. The invasion didn't rely on a strong right wing taking a single city or doing one specific action. The German plan to invade Russia was very fluid and could be changed on a dime to accommodate the strategic situation. A key example being when Guderian's Panzer Group was sent to aid in the Kiev encirclement. The 1914 offensive was intended to be a lightening quick offensive, where as Barbarossa worked in "stages". Barbarossa also had "goals" where as the Schlieffen plan was intended to capture Paris and essentially win the war.
Finally, I would just point out that the Battle of the Marne was "necessary" (in the sense that the German Army was expecting to fight the French) where as the Battle of Moscow wasn't supposed to have happened the way it did, the Russian Army was supposed to have been destroyed before the Germans got to Moscow.
I don't really understand the question. What kind of 'common thread' are you talking about? Do you mean, was there something that caused the Germans to fail in the same way twice?