I'm Lucy, and I'd be happy to answer your questions today. I'm sorry to hear about your situation.
Breaking up actually doesn't invalidate your lease - as far as the landlord is concerned, it doesn't matter what your relationship is. So, you don't have to move out, but you will be responsible for ensuring that the landlord receives the full rent payment each month, as promised in the lease agreement. That could mean getting a roommate if the apartment has two bedrooms, or if you can pay the full amount yourself, you can stay. Just make sure the landlord is aware that HE is the one breaking the lease and moving out, not you. The landlord might want you to sign a new lease in your name only. But your ex can't make you move.
If he actually does force you to leave because you can't (or don't want to) pay for the place on your own, and you want to stay, then you can argue that he has to pay the full penalty. This is because he agreed to live with you in that apartment and pay rent until the day the lease is up, and that legal contract is not contingent upon the two of you being in a relationship. It's legal and binding, and by moving out, he's breaking a promise he made to you.
If you have any questions or concerns about my response, please reply WITHOUT RATING. It's important that you are 100% satisfied with my courtesy and professionalism. Otherwise, please rate my service positively so I am paid for the time I spend answering questions. If you are on a mobile device, you may need to scroll to the right. There is no charge for follow-up questions. Thank you.