Delbert C. Jackson, 52, director of the D.C. Department of Corrections and a staunch advocate of placing prisoners in community-based settings rather than in walled prisons, died yesterday at Washington Hospital Center of complications following surgery.

Mr. Jackson was hospitalized two weeks ago to stop bleeding of the esophagus, a corrections department spokesman said. He underwent surgery at that time, the spokesman said, and developed complications yesterday.

Mayor Marion Barry in a formal statement said he was saddened at Mr. Jackson's death. He said Mr. Jackson had "provided strong leadership" in developing "an effective system for working with correctional residents" and providing "a strong and active volunteer and community-support program for the department."

D.C. Del. Walter E. Fauntroy said, "Although a soft-spoken man, Delbert Jackson was a roaring lion of a D.C. public servant who worked tirelessly toward developing a prison system that met the needs of the community and at the same time offered responsible rehabilitation to inmates."

Mr. Jackson headed the District's jail downtown and the sprawling prison complex in suburban Lorton for eight stormy years during which he was confronted with periodic escapes, prisoner strikes, litigation for improved facilities, threatened walkouts by guards and a dramatic takeover of the D.C. Jail by rebellious prisoners in 1975.

In that incident, 11 jail employes were held hostage for 17 hours, then released after a team of negotiators worked out an agreement with the prisoners. Mr. Jackson was a key negotiator.

Three years earlier, Mr. Jackson and his predecessor, Kenneth L. Hardy, narrowly averted an inmate uprising by negotiating grievances before television news cameras.

Mr. Jackson's department was the target not only of prisoners but of prison guards and residents living near the Lorton complex. Fairfax County officials complained every time escapes occurred, demanding improved security and even a shutdown of the prison.

Guards complained of being overworked and understaffed and staged a brief wildcat strike in 1980. Mr. Jackson blamed the problems on budget cuts by the cash-starved city.

Throughout his 28-year career, he constantly pushed the concept of removing offenders from the limits of prison to the more flexible environment of half-way houses and other community-based facilities. He said prison existence did little to rehabilitate many offenders and often amounted to warehousing.

"As a penologist and a human being, I could not for a moment understand, much less tolerate, warehousing of fellow human beings," he said in an interview in 1975.

" . . . I think that the community, and society at large, must understand that 98 percent of the incarcerees are going to return to the community sooner or later. That community must articulate and decide, in concert with the penal system, how they want the offender to return. If they want him returned as a better man, then they have to be willing to make the monetary and resource sacrifice necessary to do so."

Mr. Jackson was born in Montgomery, W. Va., on Sept. 19, 1929. He received a bachelor of science degree in accounting and business administration from the West Virginia Institute of Technology and came to Washington some time after graduation.

He joined the corrections department in 1954 and worked his way to the directorship in 1973. He lived on the Lorton grounds.

Survivors include his wife, Dorothy, of Lorton; four sons, Delbert C. III, who is in the Air Force at Biloxi, Miss., Sidney and Jeffrey, both of Lorton, and Ricky Lyn, of Washington; three daughters, Cheryl Drewry of Washington, Vera Giles of Langley Air Force Base, Va., and Gina, a student in Richmond, and one sister, Vera Burgin of Washington.