The 216 to 210 vote, engineered by all Democrats and a number of Republicans, marked the first-ever ousting of the Speaker of the House in 234 years.
The move, led by Representative Matt Gaetz, a far-right Republican from Florida, comes a year ahead of the US presidential elections.
Republican Representative Patrick McHenry, a key ally of McCarthy, served as interim speaker.
Source: Qatar News Agency