"I shudder to think what the world looks like in five years for us and our allies if we don't steel our resolve and stand tall with those who stand with us," said Cantor, R-Va.
Though he did not mention President Barack Obama by name, Cantor's remarks seemed aimed at his administration's foreign policy. He mentioned problems in the Middle East and tensions with Iran and Russia and said the U.S. must "make leadership abroad a priority."
Cantor spoke to the entire House for 10 minutes on his final day as No. 2 House GOP leader.
Cantor was unexpectedly defeated by an underfunded, tea party backed opponent in his Republican primary in June. He immediately announced he would step down as majority leader at the end of July.
Cantor, 51, is a seven-term House veteran who before his defeat had been seen as a potential rival - and likely successor - to House Speaker John Boehner, R-Ohio. Though he had a conservative voting record, he was distrusted by some tea party supporters who suspected he might be too eager to reach compromise on immigration legislation.
Cantor also said Friday that improving educational opportunity for low-income children is "the civil rights issue of our time."
After his speech, Cantor received a standing ovation from members of both parties and shared a hug with the No. 2 House Democrat, Rep. Steny Hoyer of Maryland.
Cantor has said he will serve out his House term, which ends in January.
He is being replaced as majority leader by Rep. Kevin McCarthy, R-Calif., who has been a close ally.