I think that is called break the lease. Contact your landlord since your have a Lease Agreement that protects the leaser and lessor (tenant and landlord) regarding payment and living in the unit.
You are responsible for all the month's payments.
Again, talk to your landlord, explain the situation and hopefully the landlord will be out with your getting (breaking) out of the lease.
How would you feel if your landlord just call you or send you a letter out of the blue for you to vacate in two months 4 months ago? Exactly but reverse.
Check with the county you live on , they might have the correct information.... more