Some franchisors allow franchisees to sell their franchises, but many franchise agreements include buy-back or right of first refusal clauses.
This allows the franchisor to buy back the franchise at a rate determined by them or match any potential buyer's offer. Make sure you know what resale rights you have in your franchise.