Hospital buildings dating back to the early 1900s could be demolished to make way for housing.
The South West Yorkshire Partnership NHS Foundation Trust plans to sell Castleford, Normanton and District Hospital.
And it has secured outline planning permission for a buyer to knock down the existing buildings and construct up to 100 new homes at the site on Lumley Street.
Alan Davis, the Trust’s director of human resources and workforce development, said: “We’re pleased that planning has been approved for the land on the Castleford, Normanton and District Hospital site.
“The funds we raise from the sale of the land will be invested straight back into healthcare facilities in the region so we can provide ever better services for the people of Pontefract and Castleford.
“For example, we’re currently investing £2.3m of trust money into the development of a new community hub at Baghill House in Pontefract so that we can provide healthcare in a more modern environment with vastly improved facilities.”
The Castleford hospital site is currently home to an administrative base for several Trust staff.
A small number of outpatient services, including adult psychological therapies, community mental health teams and day treatment services, also run from the site.
Mr Davis said patients would be able to access services at other facilities across both Pontefract and Castleford.
The Trust also secured planning permission for a Children’s and Adolescent Mental Health (CAMHS) care facility at the hospital site.
Mr Davis said possible development of the inpatient unit was in its “early stages”.
Seven residents including Altofts and Whitwood councillor and Wakefield Council leader Coun Peter Box lodged objections against the plans.
Their concerns included an increased amount of traffic around the site and road safety.
Coun Box said he objected on behalf of people living in the area.
He said: “The concerns people raised with me included even more housing being built along what is the main road into Castleford, creating additional noise, additional pollution and additional traffic.”
Castleford, Normanton and District Hospital was officially opened in 1929 by Her Royal Highness Princess Mary.
Coun Box said: “It is a facility that I have used personally so obviously I am sad to see it go.
“It is a shame that it couldn’t have been redeveloped.”