Ok, well that changes the situation considerably.
Take a look at the term of the lease and find out when it expires.
Next, go to the landlord independently and tell him your situation. Ask him if he will allow you to get off of the lease. There is no guarantee he will say yes, but if you tell him you are moving out he might agree. That would be great for you.
One good thing in your favor is that If you leave now, he will still have to pay the ENTIRE amount of the rent. The way it works with two people on a residential lease is that BOTH people are 100% liable for the total amount of the rent, so this means that the landlord can sue either person for the full amount.
Now, this means that if you leave, and he wants to stay, he will have to pay the rent or he will be kicked out. The only risk that you have in this situation is that if he doesn't pay his rent and ends up having a law suit filed against him by the landlord, you will be named as well, and will have to go to court and tell the judge your situation. This could end up on your credit history, but I think that your odds are pretty good for avoiding that in your case, as long as you make sure that you show up for court.
When you speak with the landlord, give him your new address, that way he will inform you if there is any legal action. Go to the court hearing and bring copies of all your payments made towards the rent for all the months that you paid. That should be more than enough for the judge to be wiling to hold HIM responsible for making the rent payments for the remainder of the lease,especially if you can prove that you don't live there anymore.
Again, to avoid all that and to avoid any trouble with your credit, you should talk to the landlord first. Make it clear that YOU have made all those payments and that you won't be living there anymore.
I hope this helps!