The project, proposed by two Vineland, N.J., men under the banner of Visionary Community Reentry Centers (VCRC), would have converted the former M.A.B. paint factory at 5213 Grays Ave.
Under the zoning code, the facility would have been considered a prison. Because it would have been within 500 feet of residential area, the developers needed a variance.
The Zoning Board of Adjustment first gave that permission in December 2010. Neighbors and a construction company across the street appealed.
In a decision handed down Tuesday, Common Pleas Court Judge Idee C. Fox found that the board's decision did not meet the standards for issuing a variance, which include showing "no conflict with the public interest."
"Clearly the record is replete with concerns about the effect this use will have on the community," Fox wrote.
Darwin R. Beauvais, attorney for VCRC, said he had not yet discussed a possible appeal with his clients.
The judge's decision came shortly after the unexpected death of Greg Moses, one of the lead plaintiffs and the director of a neighborhood group opposed to the facility, said lawyer Paul Boni, who represented the project's opponents.
"He's probably smiling down on Southwest Philly today," Boni said in an e-mail.
Contact staff writer Troy Graham at 215-854-2730 or tgraham@phillynews.com, or follow on Twitter @troyjgraham.