"I'm being very nice. I'm being very, very nice. But at some point, I fight back, and it won't be pretty," Trump said.
Trump's comments came as the White House girded for a preliminary vote on its budget resolution. Whether McCain would vote yes was unclear at the time of Trump's interview.
"We need some votes from some of the Republicans. For some reason, they weren't there on health care. They should have been. We thought we had it. John McCain voted no, which was a shocker," Trump said.
McCain offered a thinly veiled critique of Trump's presidency Monday night in Philadelphia, where he received the Liberty Medal from the nonpartisan National Constitution Center.
"To refuse the obligations of international leadership and our duty to remain 'the last best hope of Earth' for the sake of some half-baked, spurious nationalism cooked up by people who would rather find scapegoats than solve problems is as unpatriotic as an attachment to any other tired dogma of the past," McCain said in his remarks.
"We live in a land made of ideals, not blood and soil. . . . We have a moral obligation to continue in our just cause, and we would bring more than shame on ourselves if we don't," he said.
In response to Trump's latest comments, he told reporters on Capitol Hill: "I have faced many tough adversaries in my life."
Trump has lashed out at McCain several times in recent months, most notably after the senator broke with Republicans and opposed two proposals to undermine the Affordable Care Act.
"John McCain never had any intention of voting for this Bill, which his Governor loves," Trump tweeted on Sept. 23. "He campaigned on Repeal & Replace. Let Arizona down!"
The president appears eager to intensify his long-standing feud with McCain, who he infamously criticized in 2015 for being captured and held as a prisoner of war in Vietnam.
"He's not a war hero," Trump said at the Family Leadership Summit in Ames, Iowa. "He was a war hero because he was captured. I like people who weren't captured."
McCain, a Navy pilot, spent about 5 ½ years as a captive of the North Vietnamese after his plane was shot down in October 1967. He was repeatedly tortured and, for more than two years, held in solitary confinement.