General Milley, General McKenzie and Defense Secretary Lloyd Austin were grilled for nearly six hours by members of the Senate Armed Services Committee about the US withdrawal from Afghanistan and the chaotic evacuation from Kabul airport.
White House press secretary Jen Psaki said Mr Biden had received "split" advice about what to do in Afghanistan, which the United States invaded following the September 11 attacks on New York and Washington.
The attacks were coordinated by al-Qaeda, which the UN Security Council lists as a terrorist organisation along with many countries including Australia.
"Ultimately, it's up to the commander-in-chief to make a decision," Ms Psaki said. "He made a decision that it was time to end a 20-year war."
Source: AFP via Getty Images
General Milley, who shrugged off calls from some Republican lawmakers for him to resign, was asked whether the pullout and disorderly evacuation, during which 13 American troops were killed in bomb attack, had damaged US credibility.
"I think that our credibility with allies and partners around the world and with adversaries is being intensely reviewed by them to see which way this is going to go and I think 'damage' is one word that could be used, yes," he said.
General Milley said the Taliban "was and remains a terrorist organisation and they still have not broken ties with al-Qaeda," which plotted the 9/11 attacks from Afghanistan.
"It remains to be seen whether or not the Taliban can consolidate power or if the country will fracture into further civil war," he said. "But we must continue to protect the American people from terrorist attacks emanating from Afghanistan."
A reconstituted al-Qaeda or self-proclaimed Islamic State with aspirations to attack America remains "a very real possibility," he said, but "it's too early to determine their capability."
'Took us all by surprise'
Mr Austin said the United States "did not fully comprehend the depth of corruption and poor leadership" in the Afghan armed forces.
"We helped build a state, but we could not forge a nation," he said.
"The fact that the Afghan army we and our partners trained simply melted away - in many cases without firing a shot - took us all by surprise," the Pentagon chief said. "It would be dishonest to claim otherwise."
Mr Austin said the United States had provided the Afghan military "with equipment and aircraft and the skills to use them" but "in the end, we couldn't provide them with the will to win."
General Milley also testified about calls he made to his Chinese counterpart in the waning months of the Trump presidency.
He said they were intended to "de-escalate" tensions and the former president had no aim of attacking China.
"I know, I am certain, President Trump did not intend to attack the Chinese," General Milley said.
"My task at that time was to de-escalate. My message again was consistent: stay calm and steady and de-escalate. We are not going to attack you."
The calls between General Milley and his Chinese counterpart, General Li Zuocheng, were first revealed in the book "Peril" by Washington Post reporters Bob Woodward and Robert Costa.
The first call was on 30 October, four days before the US presidential election, and the second was on 8 January, two days after supporters of Mr Trump stormed the US Capitol in an effort to prevent certification of Mr Biden's victory.
Some Republican lawmakers have accused General Milley of overstepping his authority and called for him to resign.
General Milley defended his actions and said the calls were coordinated with the then-secretaries of defense.
"The specific purpose of the October and January calls was generated by concerning intelligence which caused us to believe the Chinese were worried about an attack by the US," General Milley said.
"These military-to-military communications at the highest levels are critical to the security of the United States in order to deconflict military actions, manage crisis, and prevent war between great powers armed with nuclear weapons.
"At no time was I attempting to change or influence the process, usurp authority, or insert myself into the chain of command.
"I firmly believe in civilian control of the military as a bedrock principle essential to this Republic and I am committed to ensuring the military stays clear of domestic politics."