“You see a fancy two-story or three-story house, and you ask, ‘Whose is it?’ They name a prosecutor working in some corner of the attorney general’s office here,” Masroor Lutfi, a law student in Parwan Province, told Mr. Hamidi during a recent official visit to the province. “Everyone who finds out that I am studying law questions my real intentions, because the law has come under question.”

Mr. Hamidi nodded in pained agreement. When it was his turn to speak, he acknowledged that the failure of the justice system had alienated people from the government, sometimes driving them to take their grievances to the Taliban even in areas under government control.

“What is the point of controlling districts when we don’t have people’s hearts?” he said.

Mr. Hamidi, a 48-year-old father of three who has been in office for seven months, is a police academy graduate who later took to civilian life and studied law. For a decade, he served as a well-respected human rights commissioner, investigating some of the earliest injustices of the political elite that set the tone after the United States invasion.

He had been working on a master’s degree at Harvard for eight months, his only time living outside Afghanistan, when he was called home after the confirmation of his appointment by the coalition government to be attorney general.

Bluntly, he says he has inherited an institution that he feels is in the same shape it was the morning after the Taliban government was overrun in 2001. Despite millions of dollars spent, there has been no attention to its most basic infrastructure, or to building the capacity of the staff; only one-third of its members have higher education.