Prosecutors said Cosby, 79, drugged and sexually assaulted Andrea Constand, the former director of operations for Temple University's women's basketball team, at his home near Philadelphia in January 2004. Cosby pleaded not guilty to the charges.
After more than six days of deliberation in Norristown, Pennsylvania, jurors were unable to come to a unanimous decision beyond a reasonable doubt.
In an exclusive interview with CNN's Jean Casarez, attorney Brian McMonagle said the jury's inability to reach a verdict made it clear the trial should end.
"It became a great concern of mine that these people had deliberated longer than the case had taken to try. Once people say they are deadlocked, then what really becomes the reason for further deliberations?" McMonagle said.
Constand first told police about the alleged assault in January 2005, a year after she says it took place. The district attorney at the time declined to press charges, citing insufficient evidence. She sued Cosby in a civil suit and settled for an undisclosed amount in 2006.
In late 2014, dozens of women went public with accusations that Cosby drugged and sexually assaulted them over the course of his lengthy comedic career and in July 2015, a judge unsealed Cosby's deposition in that 2006 civil lawsuit. Cosby's admissions in that deposition led Montgomery County prosecutors to file charges against him.
'Waiting so long, it's wrong'
McMonagle said this year's trial was unfair.
"Imagine it's you being asked to defend age-old accusations -- how do you defend that?" he said. "Mr. Cosby is fortunate he is able to afford good counsel and has resources to conduct investigations."
"Waiting so long, when people have died. Witnesses are gone," he said. "We kept running into walls trying to investigate the accusations because there's nothing left."
McMonagle said asking Cosby to surrender had been difficult.
"(It was) hard on him. When he got there, he had been awakened at home by us, told that he had to get here. He's blind, he's about 80 years old and my heart really broke for him that day. When we got there we didn't have security and people were diving on our cars. I've handled a lot of cases but I wasn't quite prepared for what I would see."
Cosby -- who is legally blind and carries a cane -- then had to endure a taxing trial, the attorney said.
"I have been greatly concerned for his health, I don't know if I can survive what he survived this week," he said. "It was difficult for me, and I have no idea how he managed to sit in a room and endure while strangers were deciding his destiny and his fate."
But the entertainer had kept positive, McMonagle said.
"During some of the most painfully, aggravating parts of our trial, particularly jury deliberations it was he who was keeping us going," he said. "Telling us stories, telling us jokes, making us smile."
McMonagle said he respected Cosby's efforts to keep his family out of the courtroom spotlight.
"I see people using their family as shields in criminal cases. He refused to do that. He refused to put them in the position of coming to court every day and being exposed to the circus-like atmosphere. He was not going to use his family as shield -- that's not who he is-- and I respect him for that."
Cosby had previously admitted to having an affair, McMonagle said, but that was not what he had been on trial for.
"As I said before, on and on, in the deposition about the carrying-ons that he was involved in the 70s. I said to this jury 'listen, we don't run from the fact that this is a man who by his own admission danced outside his marriage'."
After the judge declared a mistrial Saturday, prosecutors immediately announced they would retry the case. The judge said he would try to schedule a new trial within 120 days.
McMonagle said it was up to Cosby whether he would represent him in court again.
"If Mr. Cosby asks me and he wants me to go to back and do battle for him again, then I'll be there."