The Real Reason The US Boycotted The 1980 Summer Olympics
Since the mid-19th century, Russia had vied for control over Afghanistan, both to expand its own sphere of influence and to act as a buffer against incursions by the British in India. Known as The Great Game, this struggle for power in the region lasted until 1919, during the Third Anglo-Afghan war, which ended Britain's ambitions in the region (via Library of Congress). Russian involvement meanwhile had steadily increased before and after this conflict, as the Soviet Union shared the czar's desire for Afghanistan.
In the 1970s, the communist Democratic Republic of Afghanistan took control after a period of inner turmoil within the previous government (with KGB assistance). However, their policies, which ranged from uplifting women to uncompensated land requisition, were hated by the increasingly violent public, prompting the former to call upon the Soviet Union for aid. With the start of the Soviet-Afghan war, the United States, fueled both by anti-communism and genuine horror at the casualties, made plans to boycott the 1980 Olympics in Moscow.
Kenya stayed out of the Olympics on the advice of Muhammad Ali
President Carter warned Premier Brezhnev that the United States would not participate in the games if the conflict was not settled by February of 1980. The Soviet Union was not concerned with the ultimatum and did nothing to comply, while the United States followed through with its threat. Despite their efforts to expand this effort to an international condemnation, 80 countries still participated, including Britain and France (via Department of State Archive). That being said, 65 nations joined the U.S., including West Germany, Japan, Israel, and Canada. Muhammad Ali convinced Kenya to follow suit (via Australian Broadcasting Corporation).
The Soviets in turn boycotted the 1984 Los Angeles Olympics, but this did nothing to curtail the casualties and debt they suffered from the war. Nor could it match the sum of America's opposition, which in addition to the boycott included both sales of arms to Afghan insurgents and an embargo on vital food and technology imports (via History.com). The war lasted until 1989, two years before these factors overcame Gorbachev's hope that he could keep the Soviet Union alive. While the 1980 boycott itself did not harm the Soviets, except in the court of world opinion, by design it displayed the latter's decline in their own capital.