Depending on your situation, getting out of the remainder of your rental agreement can be extremely easy or extremely difficult. The landlord may not be sympathetic to the fact that you no longer get along with your roommates but may completely understand an excellent job offer across the country. Each situation is different and the specific circumstances must be taken into consideration when deciding the best way to break your apartment lease.
Assess your living conditions. It is up to the landlord to provide safe and sanitary conditions. If you have a problem with mold, mice, cockroaches or any other unsanitary condition, these can be grounds for breaking a lease agreement. Complain to your landlord and document your complaints. If the situation is not fixed in a timely manner, the unlivable conditions can be brought up with the landlord (backed up with documentation) as a reason to get out of the rental agreement.
Sublet your apartment. If you can not find a reason to suspect your landlord is in breach of your rental agreement, find someone else to live in the apartment. Double-check your rental agreement, there may be additional fees for roommate changes. Depending on the situation, the associated fees may be inconsequential to your desire to leave. If the sublet isn't officially done through the landlord, be sure to draw up a contract between yourself and the sub-letter, relinquishing yourself from responsibilities pertaining to the apartment. Again, be sure to check your rental agreement as sub-letting without the landlord's knowledge may put you in breach of contract.
Negotiate terms to break the lease with your landlord. Not every living situation is a bad and perhaps you simply need to move because of a job offer or family emergency. Call your landlord or management company and ask to speak with them in person. Politely explain to them the situation. In most cases, the landlord will be understanding. You may end up having to pay for the remainder of the month or even the following month, but it's better than having to pay for the remainder of the year or to taint your relationship with the landlord.