William Haynes told the Senate panel the policy reversal was "the right thing to do."
It wasn't clear whether Haynes' revised outlook on treatment of detainees solidified already shaky Senate support for his nomination.
Away from the hearing room, Democratic leader Harry Reid of Nevada left open the prospect of blocking Haynes' nomination with a filibuster.
Haynes told the panel he was glad the Justice Department reversed an opinion he had requested that cleared the way for the torture of prisoners at Guantanamo Bay.
Requesting the opinion as the Pentagon's top lawyer in 2002 "was a mistake," Haynes told the panel. He said he regretted basing his request on hypothetical — rather than actual — situations involving detainees who might have information about future terrorist attacks.
The Justice Department first issued an opinion that appeared to condone controversial prisoner treatment. The Pentagon adopted a policy that allowed several techniques, including the use of dogs to break down the resistance of recalcitrant prisoners.
In 2004, the department withdrew the opinion, saying any such treatment of detainees the opinion appeared to condone would violate President Bush's policy against torturing prisoners.
"I think it was the right thing to do," Haynes said of the policy's withdrawal. "I'm glad it's not on the books now."
The session came on the same day that the Bush administration, pressured by Congress after the Supreme Court blocked military tribunals, said all detainees at Guantanamo Bay and in U.S. military custody everywhere are entitled to human rights protections under the Geneva Conventions.
Haynes' nomination was not clear of trouble.
Chairman Arlen Specter, R-Pa., said afterward he had not yet decided whether to vote for Haynes' confirmation. Reid cited a letter by 20 retired military officers strongly opposing sending Haynes to the court in Richmond, Va.
"What compels us to take this unusual step," the letter stated, "is our profound concern about the role Mr. Haynes played in establishing — over the objections of uniformed military lawyers — detention and interrogation policies in Iraq, Afghanistan and Guantanamo which led not only to the abuse of detainees in U.S. custody but to a dangerous abrogation of the military's long-standing commitment to law."
Three Republican members of the so-called "Gang of 14" senators, who have significant say in whether controversial nominations survive, also have expressed concern about Haynes' nomination. They are Sens. Lindsey Graham of South Carolina, John McCain of Arizona and Susan Collins of Maine.
Meanwhile, a separate letter by four retired Army judge advocates urged the Judiciary Committee to approve Haynes's nomination. They said Haynes' two decades of service in the Army and the Pentagon had produced an exemplary record.