If a tenant dies, either in the hospital or in the apartment, the estate of the tenant becomes responsible for the lease and the rent.
If the tenant had a will, the surrogate court will authorize an administrator for the estate, and the administrator will work to empty the apartment and return the keys to the landlord.
If there is no will, and no heirs/family members can be found, the county’s public administrator is responsible for resolving the apartment issues.
If there are family members or roommates in the apartment, they cannot be forced out or locked out by the landlord – the landlord must go to court and start an eviction proceeding against them.