In 561 Schwyz became part of the Ducatus alamannorum and remained relatively independent under the Alemanni dukes until the second quarter of the 8th century. The Alemanni began to settle into the valleys around 680, but for centuries the Germanic speaking Alemanni and the Romansh speaking Gallo-Romans coexisted. Romansh remained the main language in Einsiedeln until the 10th century.

In the 8th and 9th centuries the land was under the Counts of the Zürichgau.

The valley of Schwyz is first mentioned in 972 under the name Suittes. Later, a community of freemen is found settled at the foot of the Mythen. These freemen, possessing common lands, were subject only to the count of the Zürichgau, as representing the German king. The economy benefited from the transit across the Gotthard, but these profits attracted other powers, such as the Habsburgs.

The inner or mountainous portion of Schwyz were controlled by the Counts of Lenzburg until 1173. The Lenzburg lands were inherited by the Counts of Kyburg and Frohburg, the Lords of Rapperswil and the Habsburgs. During the 10th century Einsiedeln Abbey became more and more powerful and soon controlled many of the surrounding lands, many of which are outside the area today covered by the canton of Schwyz.

The outer or lake side parts of the canton were partly controlled by the Abbeys of St. Gallen, Pfäfers, Rüti and Schänis along with the Lords of Habsburg, Toggenburg and Rapperswil. Both Pfäffikon Castle and Alt Rapperswil Castle were built by these landlords to control their landholdings. In contrast to the Swiss Plateau where the local nobility and knights ruled extensive landholdings for the regional counts, in Schwyz there were very few local nobles and they were generally poorer and less important than the monasteries' representatives or the leaders of the local livestock collectives. Much of the farming or grazing land in the inner portion of Schwyz was not privately owned but was common land. To administer the land the local collectives developed into regional collectives that covered several towns and villages. The collectives helped create a sense of unity throughout the farming towns and villages of the valleys and developed a tradition of independence.

With the extinction of the Kyburgs and the decline of the Lords of Rapperswil in the second half of the 13th century, the Habsburgs attempted to claim sovereignty over the Kyburg and Rapperswil lands in Central Switzerland. They succeeded in acquiring the parishes of Schwyz, Steinen, Muotathal and Morschach and in 1283 the patronage over the monastery of Einsiedeln. In 1240, Emperor Frederick II granted the Schwyz valley imperial immediacy for services that they had rendered to the Emperor.
While the farming villages of the valleys drew closer together, the expansion of the Habsburgs and changing relationships between the farmers of the alpine valleys and the monasteries led to conflicts such as the Marchenstreit between Schwyz and Einseideln Abbey. The Marchenstreit started around 1100 over grazing rights around the Mythen mountains and dragged on, with court cases and violent raids, until about 1350.

In 1 August 1291, the cantons of Schwyz, Uri and Unterwalden entered into an Eternal Alliance that would eventually become the Swiss Confederation. The Federal Charter of 1291 was probably prompted by the death of Rudolf I of Habsburg on 15 July 1291 and created a defensive alliance. The Rütlischwur (Oath of the Rütli) was another alliance between the Forest Cantons in or around 1308 and brought the cantons closer together. The canton of Schwyz took the leadership in the confederation early on. As early as 1320 the name of the canton was applied to the whole of the confederation. It was only in 1803, however, that the name Schweiz as derived from the canton of Schwyz became the official name of Switzerland. The flag of Switzerland is derived from the banner of Schwyz.

With the Eternal Alliance, the three cantons remained politically independent, with a central council to deal with disputes among the members, and with promises of military assistance. The cantons became de facto independent from the Habsburgs at the same time as the Habsburgs were attempting to expand into the Forest Cantons. When the century-old Marchenstreit between Schwyz and Einseideln Abbey led to a Schwyz attack on the Abbey in 1314, the Habsburgs, as patrons of the Abbey, had an opportunity for military action against them.

On 15 November 1315, Leopold of Austria led a large army of knights to crush the rebellious confederates, planning a surprise attack from the south via Lake Aegeri and the Morgarten pass, and counting on a complete victory over the rebellious peasants. The Confederates prepared a road block and an ambush at a point between Lake Aegeri and the Morgarten Pass where the narrow path led between the steep slope and a swamp. When the Austrian army entered the ambush, the Confederates attacked from above with rocks, logs and halberds leading to a decisive victory of the Confederates. After the victory at Morgarten, the Forest Cantons met at Brunnen on 9 December 1315 to renew the promise of mutual military assistance. The Pact of Brunnen, which emerged from the meeting, changed the pragmatic defensive alliance into a full confederacy. During the following forty years, five nearby cities (Lucerne in 1332, Zürich in 1351, Glarus and Zug in 1352 and Bern in 1353) joined the Pact and began the growth of the Old Swiss Confederacy.

As the Confederation expanded, Schwyz took a leading role in the new organization. The aggressive, expansionist foreign policy of Schwyz led to its name being applied to the entire Confederation. Even in the 14th century, the chronicles of the surrounding countries referred to the Confederation as Schwyzer or Schweizer (the modern German spelling). With its exterior borders secured, Schwyz began to acquire rights and land in the neighboring valley. In 1386, Schwyz invaded and occupied the town of Einsiedeln, and by 1424 the monastery was under Schwyz' control, though it retained some independence. Between 1386 and 1436, Schwyz brought under its direct control the entire March District, which became part of the canton. In 1424, Küssnacht became part of the canton. Villages and lands along Lake Zürich, including Wollerau and Pfäffikon (in 1440), Hurden and Ufenau Island all became part of the canton in the 14th and 15th centuries. King Sigismund granted Schwyz the right to High Justice over Schwyz, Einsiedeln, Küssnacht and March in 1415 as a reward for their military support against Frederick IV of Habsburg.

In 1385, Zürich, Zug and Lucerne attacked several Habsburg strongholds and in the following year Lucerne entered into alliances with several Habsburg cities in an attempt to pull those cities into Lucerne's sphere of influence. In response, Leopold III of Austria gathered an army and prepared to invade the Confederation. After a minor battle, a short-lived armistice was declared, but by early July 1386 the Habsburg army was on the move toward the Lucerne city of Sempach. On 9 July 1386 a Confederation force from Lucerne, Uri, Schwyz and Unterwalden met the Austrian army in the Battle of Sempach. While the Habsburg knights initially drove the lightly armored Swiss back, around mid-day the Swiss gained the upper hand and killed Leopold and forced his army to retreat. Much like the Battle of Morgarten, Sempach helped cement the Confederation into a further unified federation. While Schwyz gained no territory from the battle, both Bern and Lucerne gained significant territories at the expense of the Habsburgs.

In 1402/3 Schwyz signed an alliance with Appenzell, which was seeking independence from the Abbey of St. Gall. In May 1403, the Abbot and the Habsburgs sent a force to defeat the rebellious Appenzellers while Schwyz and Glarus sent troops to defend their ally. On 15 May 1403, the Abbot's forces entered the pass leading to Speicher, and outside the village of Vögelinsegg they met the Appenzell army. A detachment of about 80 Appenzellers started the attack from a hill over the valley, with about 300 soldiers from Schwyz and 200 from Glarus moving around the flanks of the army. When the League's cavalry charged up the hill, they met 2000 Appenzellers and were forced to retreat. During the retreat, about 600 horsemen and many of the 5000 infantry were killed by the Appenzell army.[16] The League signed a peace treaty with Appenzell at Arbon, but the peace was short-lived. Appenzell formed an anti-Habsburg alliance, the Bund ob dem See, with several cities including Bregenz. In 1408 the Habsburgs besieged Bregenz, and the Bund, including Schwyz, marched out to support Bregenz. However, when they met the Habsburgs, the Bund was decisively defeated and the Bund collapsed. Schwyz paid the Habsburgs off to avoid an attack and Appenzell retained some independence but eventually became an associate of the Confederation.

In 1440-46, Schwyz and six other cantons fought against Zürich and the Habsburgs in the Old Zürich War. The eventual peace brought Zürich back into the Confederation and forced them to cancel their treaty with the Austrians. After the war, Schwyz acquired the villages of Wollerau and Pfäffikon (now in Freienbach) and shared control of Uznach and Gaster (both now in St. Gallen) with Glarus. The war also showed that the confederation had grown into a political alliance so close that it no longer tolerated separatist tendencies of a single member.[18]
In the 15th century, Schwyz joined Uri and Nidwalden in attempting to expand south of the Gotthard Pass to gain the revenue from trade over the pass. By the 16th century they controlled, as a federal condominium, the Riveria valley, the Blenio valley, the Maggia valley and the towns of Bellinzona, Lugano, Mendrisio and Locarno.

Swiss History Timeline - Canton Schwyz
Schwyz coat-of-arms