Obama bypassed Congress to arrange the deal, causing some to criticize the move. Hagel said it was necessary.
"It was our judgment that if we could find an opening, we needed to get him out of there, essentially to save his life," Hagel said.
"We believed that the information we had, the intelligence we had, was such that Sgt. Bergdahl's safety and health were both in jeopardy and in particular his health deteriorating," Hagel added. "It was our judgment that if we could find an opening and move very quickly with that opening, that we needed to get him out of there essentially to save his life. I know President Obama feels very strongly about that, I do as well."
Bergdahl, 28, was transported to Landstuhl Medical Center in Germany after five years of captivity with the Taliban. His condition wasn't reported.
"When you can bring one of your own people home, when you think of what he has endured the last five years — my own experiences in Vietnam as we had POWs taken," Mr. Hagel told reporters aboard his flight to Afghanistan, appearing to struggle for words. "I am intensely happy and gratified."
Obama announced the release Saturday during a news conference with Bergdahl's parents.
"While Bowe was gone, he was never forgotten," the President said.
"We will continue to stay strong for Bowe while he recovers," the sergeant's mother, Jani, said.
"The complicated nature of this recovery will never really be comprehended," his father, Bob, added.