Alabama Senator Jeff Sessions, 69, also pledged to recuse himself from any investigation into former Democratic presidential candidate Hillary Clinton.
A Democratic senator expressed "deep concern" about the Alabama Republican's nomination.
But Democrats do not have the power in the chamber to block his confirmation.
The attorney general, America's top prosecutor, leads the US justice department and acts as the main adviser to the president on legal issues.
Mr. Sessions, 69, said during testimony before the Senate Judiciary Committee that allegations he had once supported the KKK were "damnably false".
"I abhor the Klan and what it represents and its hateful ideology," he added.
Mr. Sessions also acknowledged "the horrendous impact that relentless and systemic discrimination and the denial of voting rights has had on our African-American brothers and sisters".
Protesters repeatedly disrupted Tuesday's hearing, including a couple dressed in KKK white robes who chanted: "No Trump, No KKK, No Racist USA."
"Stop this racist pig from getting into power," shouted an African-American demonstrator as she was led out of the hearing by police.
Democratic Senator Dianne Feinstein voiced her concern over "fear in this country, particularly among the African-American community".
She noted Mr. Sessions had voted against an amendment affirming that the US would not bar people entering the US on the basis of their religion.
She also pointed out he had previously opposed efforts to ban waterboarding and expressed skepticism about the need for an anti-hate crime law.
"There's deep fear about what a Trump administration will bring in many places," said Ms. Feinstein.
But Republican Senator Chuck Grassley described the nominee as a "man of honor and integrity".
Mr. Sessions also promised to remove himself from any investigation into Mrs. Clinton, as well as her family's charitable foundation.
He said his past criticism of Mrs. Clinton's use of private emails and dealings with the Clinton Foundation while she served as secretary of state "could place my objectivity in question".
"We can never have a political dispute turn into a criminal dispute," Mr. Sessions told the committee.
Mr. Trump had pledged on the campaign trail to appoint a special prosecutor to investigate Mrs. Clinton, even after the FBI concluded it could not recommend criminal charges.
The president-elect has since walked back those comments.
In other testimony:
§ Mr. Sessions accepted that same-sex marriage and the legal right to abortion were the law of the land
§ He said he does not support the "idea that Muslims as a religious group should be denied admission to the United States. We have great Muslim citizens"
§ Mr. Sessions said the detention center at Guantanamo Bay is a "safe place to keep prisoners" and it "fits that purpose marvelously well"
Why is Jeff Sessions a controversial choice?
The Alabama politician, with 20 years under his belt in the Senate, is known as one of the most conservative members of the upper chamber.
He was denied a federal judgeship in 1986 after the Senate Judiciary Committee heard testimony that he made racist remarks.
Mr. Sessions was also accused of calling a black assistant US attorney "boy" and telling him to be careful about how he spoke to "white folks". But he denied saying it.
He also rejected claims on Tuesday that he once called the National Association for the Advancement of Colored People (NAACP) "un-American".
But Republicans who have known him a long time and worked with him deny Mr. Sessions is a racist.
Some have pointed out he supported the award of a Congressional Gold Medal to civil rights heroine Rosa Parks.