Dr. James L. Luke, who has been the District's chief medical examiner for the last 12 years and is credited with expanding and upgrading that office's staff and facilities, has resigned because he says he can no longer do his job properly with the amount of money the city is willing to allocate to the office.

"Our budget problems make it hard to recruit experienced people in forensic medicine," said Luke, whose resignation is effective next Wednesday. "I don't want to accept a responsibility I can no longer complete in an acceptable professional manner."

Luke, whose annual salary is $55,900, said he has had trouble recruiting and keeping doctors on his staff because of the requirement that they must live in the District, and because the salaries the city pays its medical examiners "rank at the bottom" nationally. Luke's deputy, Dr. Brian Blackbourne, left his post earlier this year to become chief medical examiner for Massachusetts.

Luke, 50, said he did not have another job lined up when he submitted his resignation last week to acting Public Health Commissioner Ernest Hardaway.

City officials contacted last night said they were surprised by Luke's decision and had no idea who would replace him.

"I'm just amazed," said Police Chief Maurice Turner. "I had no idea that Dr. Luke was dissatisfied or frustrated . . . He didn't call upon me or anybody else in the police department to support him." City Council Chairman David A. Clarke said he was unaware that Luke had resigned. Hardaway and Mayor Marion Barry could not be reached for comment.

Luke said his decision to leave was, in part, personal. "I've been there for 12 years, I've accomplished what I wanted to accomplish, now I'm casting about for something new to do," he said.

The medical examiner's office investigates about 4,000 cases a year of suicides, homicides, accidental deaths and other cases in which the cause of death is unclear. The office also provides testimony in court cases, conducts research and keeps records on all deaths.

"His departure is a loss to the criminal justice system," principal assistant U.S. Attorney Joseph diGenova said of Luke, who has testified in hundreds of homicide cases.

"The guy's irreplaceable. That medical examiner's office is probably one of the most efficiently run agencies in the city government," said Detective Lou Hennessy of the homicide squad.

When he came here in 1971, the silver-haired, pipe-smoking Luke took over a medical examiner's office in a cramped building that lacked air conditioning, had only one microscope and a single forensic pathologist--a doctor trained in the examination of organs and tissues.

Luke was the first medical examiner in the District to have that title. He succeeded Dr. Richard L. Whelton--the city's last coroner--in 1971.

During his tenure, Luke persuaded the District government to provide him with a new building, staffed his office with more pathologists and turned it into a research laboratory that studied conditions in the city as well as trends and patterns of life and death.

But since 1976, Luke said, the number of positions allotted to his office dwindled from 41 to 32. He said the office's budget for purchasing equipment and supplies was $170,000 last year, and $55,900 has been budgeted for fiscal 1984, which begins Oct. 1.

The office's overall budget of $1.1 million has remained fairly constant over the past few years, Luke said, but no longer provides enough to permit him to do "an adequate job."

Over the years, Luke--a man who shied from publicity but nonetheless rarely minced words with his staff--won praise from associates in and out of his office.

"He's really one of the best forensic pathologists in this nation, a very diligent man and just devoted to this kind of job," said Dr. Rak W. Kim, a medical examiner who has worked with Luke for 12 years.