A lawsuit can be filed in the state where the plaintiff resides (landlord is the plaintiff) or in the state where the defendant resides (you are the defendant) or in the state where the claim arose.The fact that you are moving to another state doesn't prevent you from being sued.  However, there may be limitations on the jurisdiction of Small Claims Court regarding suing someone in another state.  The rules regarding Small Claims Court jurisdiction vary from state to state.If all you received was a letter about being sued, that is not valid service of process unless it was a notice and acknowledgment of receipt that you are to return to the sender.If the conditions at your rental violated the state or local housing code, you could move out and terminate the obligation to pay rent for the balance of the term of the lease if the conditions constituted a breach of the implied warranty of habitability.  Not all maintenance problems  or other problems constitute a breach of the implied warranty of habitability.  The implied warranty of habitability is in every lease and requires the landlord to maintain the premises in a habitable condition by complying with state and local housing codes.  Although you didn't have a formal lease, you may be able to argue that a landlord/tenant relationship existed and therefore the implied warranty of habitability should be applicable.