The original blitzkrieg invasion plan, which the Axis called Operation Barbarossa, had called for the capture of Moscow within three to four months. However, despite large initial advances, the Wehrmacht was soon slowed by Soviet resistance (in particular during the Battle of Smolensk, which lasted from July through September 1941 and delayed the German offensive towards Moscow for two months). Having secured Smolensk, the Wehrmacht was forced to consolidate its lines around Leningrad and Kiev, further delaying the drive towards Moscow. The Axis advance was finally renewed on September 30, 1941, with an offensive codenamed Operation Typhoon, the goal of which was the capture of Moscow before the onset of winter.
After a successful initial advance leading to the encirclement and destruction of several Soviet armies, the German offensive was stopped by Soviet resistance at the Mozhaisk defensive line, just 120 km (75 mi) from the capital. Having penetrated the Soviet defenses, the Wehrmacht offensive was slowed by weather conditions, with autumn rains turning roads and fields into thick mud that significantly impeded Axis vehicles, horses, and soldiers. Although the onset of colder weather and the freezing of the ground allowed the Axis advance to continue, it continued to struggle in the face of the severe cold and stiffening Soviet resistance.
By early December, the lead German Panzer Groups stood less than 30 kilometers (19 mi) from the Kremlin, and Wehrmacht officers were able to see some of Moscow's buildings with binoculars; but, handicapped by cold and exhausted troops, the Axis forces were unable to make further advances. On December 5, 1941, fresh Soviet Siberian troops, prepared for winter warfare, attacked the German forces in front of Moscow; by January 1942, the Wehrmacht had been driven back 100 to 250 km (60 to 150 mi), ending the immediate threat to Moscow and marking the closest that Axis forces ever got to capturing the Soviet capital.
http://en.wikipedia.org/wiki/Battle_of_Moscow