The law tends to favor the franchiser over the franchisee when it comes to breaking a franchise contract, primarily because franchisers are able to limit their liability via UFOCs and franchise agreements with built-in clauses and disclosures. It's no wonder that franchisees have little wiggle room when opting out of an agreement: franchisers are required to list and substantiate earnings claims, current and past litigation, the number of franchises in operation and the number terminated, and all other related material in the UFOC/FDD document.
Occasionally franchisers will provide a buyout clause to franchisees, but most franchisers want to preserve franchise agreements to save money and time. Hence, franchisers generally make every attempt to reconcile problems via arbitration or mediation.
If the franchiser has not held up its end of the deal, however - that is, the franchiser has either made misleading statements to you or has not followed through on advertising agreements or training - you may have a case to work with. Should arbitration or mediation be unsuccessful, you can always pursue a lawsuit. Though some franchisers allow subfranchising or reselling, the franchiser sometimes maintains the right to buy your franchise back from you, which ultimately may garner a less than market value price.
The franchiser has an easier route to ending an agreement than do franchisees should a franchisee default on the franchise contract. There are agreements that contain disclaimers allowing franchisers to end the agreement at their discretion, though these types of clauses are quickly losing popularity. Alternatively, franchisers are rewriting disclaimers so that they limit their ability to terminate contracts.
For the franchiser to cancel the contract, one or several conditions must be met: the franchisee stops doing business, the franchisee declares bankruptcy, the franchisee is defrauding the company, the brand name is being damaged, or there has been a substantial loss of revenue and brand value. Even in the case that the above conditions are met, most franchisers will offer a cure period to the franchisee which provides the franchisee the opportunity to rectify the default.