You can help the situation a lot by providing as much notice as possible and writing a sincere letter to your landlord explaining why you need to leave early. Ideally you can offer your landlord a qualified replacement tenant, someone with good credit and excellent references, to sign a new lease with your landlord.