Homeless New Yorkers are poised to hit the jackpot in the affordable-housing lottery without even entering, thanks to a new de Blasio administration initiative.

After Feb. 14, City Hall will match shelter residents to affordable units that go unclaimed in the Department of Housing Preservation and Development’s lottery, The Post has learned. The city will pick up the tab — an estimated $2.5 to $3 million in rent annually — for approximately 200 units, many of them in luxe, highly desirable buildings.

Landlords — who were previously allowed to find their own tenants for any of the rent-regulated units left unfilled after the lotteries — were notified of the impending change last week in a letter from HPD, selling the program as an “exciting” win-win.

“[T]he new guidelines create a pathway to rent those vacancies to homeless households,” read the letter obtained by The Post. “We are pleased to make this new program available to ensure you are able to collect the anticipated rents for your affordable units.”

Only 421-a units — or lower-rent apartments placed within market-rate buildings in exchange for tax exemptions to the landlord — and those subject to Housing Development Corp. agreements are eligible, according to a fact sheet that accompanied the letter.

Additionally, only city shelter residents who do not require in-building support services — such as mental health or substance abuse counseling — are eligible.

But lawyers who represent landlords of 421-a buildings griped that there wouldn’t be empty units in the buildings if not for narrowly defined, citywide earning limits for what defines an affordable apartment.

“Yes, there can be 50,000 applicants, but perhaps not enough of them may be at the income level needed for the project because the affordability limits are citywide and are not tailored for the neighborhood,” said attorney Dan Bernstein, a partner with the law firm Rosenberg & Estis.

A City Hall spokeswoman touted the initiative as a step to reduce the city’s considerable homeless population.

“The administration is identifying new and creative ways to combat homelessness,” said rep Jane Meyer. “We saw an opportunity to provide high-quality permanent housing to some of our homeless neighbors, and we are seizing it.”

The effort comes as the city’s homeless population faces a list of issues so daunting — including a near record-high number of homeless schoolchildren, a decade-high number of deaths and conditions in city shelters that leave half of resident domestic-violence victims feeling unsafe — that Mayor Bill de Blasio pleaded for help from President Trump.