"Now, somebody did it because they thought I didn't like him okay? And, they were well-meaning," Trump said. "I didn't know anything about it. I would never have done that," he added.
Later, asked if he or the White House should apologize for the directive, the president said he can't apologize because he didn't know anything about it and doesn't know who did it.
"We'll probably find out who did they thought they were doing me a favor because they know I'm not a fan of John McCain. John McCain killed health care for the Republican party and he killed health care for the nation."
Earlier, on an overseas trip, acting Defense Secretary Patrick Shanahan said he would never dishonor the name of a great American patriot like Sen. McCain.
"I never authorized, I never approved any action around the movement or activity regarding that ship. Furthermore, I would never dishonor the memory of a great American patriot like Senator McCain. I also think it’s important, I’d never disrespect the young men and women that crew that ship. I’ve asked my chief of staff to look into the matter.”
On ABC's "The View," Meghan McCain, the late senator's daughter, defended her father's legacy and said that Trump's actions have affected her grieving process.
"It's a bizarre way to say goodbye," she said. "It is weaponizing his legacy."
“The president’s actions have consequences and when you repeatedly are attacking my father and war heroes it creates a culture in the military where people are clearly fearful to show my father’s name in one way or another,” she said. “ And that, I think, that is what has started this chain of events and actions.”
“I don’t blame the people in the military” McCain said. “I have nothing but respect for people who serve.”
“You’re putting people in the military in horrific situations, they’re fearful of their jobs,” she added. “If, God forbid, you’re a sailor on this ship you think there’s going to be some retribution and I think it’s horrible. I think it’s bad as Americans and I think we really have to look at the kind of culture that’s being put in place.”
“It’s impossible to go through the grief process when my father, who has been dead 10 months, is constantly in the news cycle because the president is so obsessed with the fact that he’s never going to be a great man like he was,” McCain said to applause from the audience.
Explaining that she still struggles with the grief associated with her dad’s death “but when Trump is doing this it makes it this much more complicated."
ABC News' Luis Martinez contributed to this report.