The continuation of border wall construction in Texas is a major policy pivot for the Biden administration and comes amid an influx of migrants at the border.
It was not clear who would replace McCarthy, who was elected speaker in January after Republicans won control of the House in the 2022 midterm elections.
The Supreme Court has been under scrutiny this year because of reports about justices including Clarence Thomas receiving benefits without disclosing them.