No. If tenants are sharing a rental property and each paid part of the security deposit, the landlord does not have to return part of the security deposit if one tenant moves out early. The landlord usually only returns the security deposit when the tenancy ends. When the landlord returns the security deposit at the end of the tenancy, the landlord must make the cheque out to all of original tenants named on the lease, even if one of the tenants already left the premises.
If the landlord does agree to return some of the security deposit early, the agreement should be in writing.
Tenants may also want to create a roommate agreement to specify what happens to the security deposit if one person leaves early.