Generally, a landlord-tenant relationship is dictated by a variety of legal sources. The must relevant is the lease, which is interpreted with contract law principles. State statutes and sometimes local ordinances I would imagine several ordinances exist relating to landlord-tenant law) will also provide much needed protections to tenants.
The answer depends on what your lease provisions say regarding termination of the lease and also what local statutes and ordinances say about vermin infestation. Generally, a landlord in a residential tenancy is required to provide habitable premises. This requirement varies state-by-state depending on the above-mentioned legal sources as well as by previous state court cases on the subject. If the local law provides your situation exemplifies a breach of the landlord's warranty of habitability, then you may have a legal right to terminate the lease. However, if there isn't a legal justification under local law and you leave, the landlord can hold you responsible for the remaining rent on the lease until a new tenant is found.
Thus, it is difficult to provide any meaningful answer without (1) examining the lease, (2) looking into state and local laws, and (3) getting much more information on the facts surrounding the landlord's termination of your lease. I would recommend contacting a local attorney either on Avvo or through your local lawyer referral service to get a better idea of your rights and remedies. This is important because leaving the apartment without a legal justification (i.e. if your situation did not qualify as a breach of the warranty of habitability under local law) would make you liable to the landlord for rent.
NOTE: This answer is not intended to be legal advice and should not be construed in that way. This answer does not create an attorney-client relationship and no such relationship may be created absent a signed retainer agreement. The author is licensed in Illinois only, and his answer is for educational purposes alone.