James L. Denson, a former president of the D.C. Chamber of Commerce, was indicted yesterday along with two former high-ranking aides to Detroit Mayor Coleman A. Young on charges that they illegally arranged to loan $1 million in Detroit city funds to Denson's company.

The alleged secret loan was made last year to Magnum Oil Co., a firm headed by Denson that serves as an exclusive middleman in supplying fuel oil for Detroit's city buses. The indictment says the three defendants did not have the legal authority to award the loan, which was made at below-market interest rates and without the city council's knowledge.

The action by a Wayne County, Mich., grand jury, coming two months after the indictment of Young's director of water and sewerage on unrelated bribery charges, could be a political setback for Young, one of the nation's most respected black Democratic leaders and president of the U.S. Conference of Mayors.

Indicted with Denson on misdemeanor charges were Paul R. Thompson Jr., who resigned last spring as Young's finance director, and Alexander N. Luvall Jr., who until last year was executive assistant to the mayor. Young's former transportation director was named as an unindicted co-conspirator. Denson, Thompson, and Luvall face up to two years in prison if convicted on the charges.

Denson resigned from the D.C. Chamber of Commerce in 1980 after allegations that he misappropriated thousands of dollars in chamber funds to further his private business interests. Denson, who also stepped down as chairman of the D.C. Board of Elections and Ethics, maintained at the time that he had not done anything intentionally illegal.

"There's been no crime committed and we're confident that will be shown at the trial," said Denson's attorney, N.C. Larene, adding that the $1 million was a prepayment on Denson's contract. Thompson's attorney, Neil Fink, said "the indictment is the ultimate act of irresponsibility."

Magnum Oil has been the focus of a long controversy in Detroit because of allegations that the firm overcharged the city up to $800,000 a year by failing to follow a contractual requirement to lower its charges when the market price of oil dropped. City council members voted to subpoena the contract records after learning that they unwittingly had approved a $1 million loan for Magnum that was buried in a routine budget item. But Young, citing the grand jury probe, has refused to comply with the subpoena.

"It is absurd that a city that is now $60 million in debt should be making such loans," said Detroit councilman Mel Ravitz. "The indictments don't do the mayor any good, but he remains in many respects a folk hero, at least in the black community."

Young, who declined to comment yesterday, has said there were "screwups beyond compare" on the Magnum contract, but that he knew of no criminal wrongdoing.