The Ellis Act (California Government Code Chapter 12.75) is a 1985 California state law that allows landlords to evict residential tenants to "go out of the rental business" in spite of desires by local governments to compel them to continue providing rental housing.
The legislature passed the Ellis Act in response to the California Supreme Court's decision in Nash v. City of Santa Monica (1984) 37 Cal. 3d 97 that held that municipalities could prevent landlords from evicting their tenants to "go out of business" in order to withdraw their property from the rental market.  
The Ellis Act prohibits local entities, such as cities, from having rent control ordinances that prevent owners of housing from evicting tenants if the landlord is required to continue providing housing. The Act does not limit ordinances that control landlords who continue renting. For example, an ordinance may prevent a landlord from evicting a tenant and then renting to another tenant.
To take advantage of the Ellis Act, a landlord must terminate all residential tenancies and withdraw all "accommodations," which roughly means all "residential rental units." The landlord cannot, for instance, terminate the tenancies of rental units with lower, rent-controlled, rents and maintain market rate tenancies at the same time.
Local entities are permitted to place various restrictions on the landlord's ability to go out of business. For instance, cities may require landlords to file a "notice of intent to withdraw," provide the city with information about the tenancy (such as names of tenants, dates of commencement, and rental rates). Cities may require the payment of relocation assistance "to mitigate any adverse impact on persons displaced" or an extension of the termination date of tenancies from the standard 120 days to a full year from the commencement of the withdrawal process if tenants claim to be at least 62 or disabled.
The city may also impose restrictions against the future rental use of the property. It may require that if the landlord offers the withdrawn units for lease within ten years of withdrawal, the unit must be offered to the displaced tenant(s), and that if the unit is offered within the first five years, it must be offered to the displaced tenant(s) at the former rental rate.
The Ellis Act is named after Republican State Senator (1981-1988) James "Jim" L. Ellis, a former representative of San Diego.
The California legislature passed the Ellis Act in response to the California Supreme Court's ruling in Nash v. City of Santa Monica that municipalities could prevent landlords from evicting their tenants to "go out of business" in order to withdraw their property from the rental market.  
Implementing statutes vary by city and so there are different requirements in each jurisdiction:
San Francisco requires compensation, which increases along with CPI. As of 2019, it was $6,985.23 per tenant, with an additional $4656.81 per disabled or elderly tenant, capped at $20,955.68 per unit.
In 2014 and 2015, San Francisco Supervisor David Campos authored two pieces of legislation to attempt to increase the relocation payments to provide for two years of market rate subsidy to displaced tenants. The first attempt in 2014 with unlimited total payment amount and no requirement that the money be spent on relocation was declared an unconstitutional violation of property rights by a federal court.       In 2015, the second piece of legislation was a scaled back version of the 2014 legislation which this time limited the relocation to a maximum of $50,000 per tenant and required that the monies be spent on relocation.   That law was struck down by a state court because it “placed a prohibitive price on a landlord’s right to exit the rental market.”    
An amendment to the Ellis Act for San Francisco County was proposed in 2014 in the California State Legislature, SB1439  If enacted, SB 1439 would have required property owners who have filed an Ellis eviction to wait five years before doing so with another building. The measure did not pass.
If withdrawn residential units can no longer be rented, property owners invoking the Ellis Act often sell apartments as individual tenancy-in-common ("TIC") units. Some cities, such as San Francisco, impose strict restrictions on withdrawn property (such as preventing condominium conversion or the adding of Accessory Dwelling Units   ). However, a 2016 decision by the First District Court of Appeals  upheld a challenge against San Francisco's ordinance preventing Ellis Act "mergers" of units and found that state law occupies the field of substantive eviction controls "for owners attempting to withdraw units from the residential rental market" and suggested that the Ellis Act may impose a limit on post-withdrawal "penalties" that seek to discourage the use of that right under state law.
Criticism and response
Tenant groups in San Francisco and Los Angeles claim that California landlords commonly misuse the Ellis Act "to bypass rent control" and to cash in during peak housing market periods by managing rent-stabilized properties to vacancy, when they might demolish buildings to build pricey condominiums, retenant newly-vacated units at top-market rents, or resell buildings at much higher prices than they bought, once they are no longer value-encumbered by the presence of long-term, rent-stabilized tenants.