When Sen. Marco Rubio announced his presidential run last April, his carefully constructed image as a foreign policy hawk seemed as much liability as asset, a possible turnoff for voters consumed by economic struggles and weary of bloody fights in Afghanistan and Iraq.

But as the Republican race moves to South Carolina, a state where veterans and national security play an outsize role, Mr. Rubio is seizing on his longtime cultivation of a national-security expertise as a central element of a hoped-for comeback after a disappointing showing in New Hampshire.

At an appearance in a retirement community in Okatie, S.C., Thursday morning, Mr. Rubio went after rival Donald Trump on his lack of foreign policy seasoning. “Donald Trump has zero foreign policy experience,” Mr. Rubio said of the real-estate mogul. “Negotiating a hotel deal in another country is not foreign policy experience.”

Mr. Rubio is leveling a similar criticism against former Florida Gov. Jeb Bush. Speaking to reporters at a Cracker Barrel restaurant in Okatie, Mr. Rubio said Mr. Bush “doesn’t have any foreign-policy experience. He has none. And I do think that the most important job of a president is to be commander-in-chief.”

Mr. Rubio’s rivals dispute his characterization. Mr. Bush himself is also looking to gain a footing in South Carolina by stressing national security, and has turned to his brother, former President George W. Bush, and Sen. Lindsey Graham (R., S.C.), who are making appearances to tell voters the country would be safe in Mr. Bush’s hands.