More than a dozen members missed the vote, including 11 Democrats.
The result leaves Hegseth in office for now. It does not settle the political fight over his place in the administration.
Impeachment resolutions can be carried past the end of a congressional term. Democrats would be able to take the matter up again next year.
Massie was the only Republican to vote against moving the resolution to the Republican-led House Judiciary Committee.
"Again, Victories in Venezuela and Iran, the Best Recruitment Numbers in the History of the Military (Long waiting lists to get in!), and Spirit like rarely seen before, led to the EXONERATION of a Great American Patriot,"Trump said, referring to Hegseth.
Hegseth has survived politically for now. Many lawmakers, including some Republicans, have questioned how long he can last in the administration.