Can My Landlord Evict Me for Complaining or Reporting Code Violations?

Written & reviewed by NotALawyer Review AI · Updated June 26, 2026

In most states, no — that's an illegal 'retaliatory eviction.' If you exercise a legal right, like reporting a code violation or asking for a repair the law requires, and your landlord responds by trying to evict you, raise your rent, or cut services, the law in most states treats that as retaliation. Many states even apply a timing presumption: if the landlord acts soon after your protected complaint, retaliation is assumed unless they can show a legitimate reason.

What counts as protected activity

Commonly protected actions include reporting health or safety violations to a code or housing agency, asking in writing for repairs the law requires, joining or organizing a tenants' union, and exercising other legal rights under your lease or state law.

The timing presumption

Many states presume retaliation if a landlord raises rent, cuts services, or moves to evict within a set window — often several months — after your protected complaint. That presumption shifts the burden to the landlord to prove a non-retaliatory reason.

It's a shield, not a free pass

Retaliation protections don't cancel your own obligations. A landlord can usually still evict for legitimate, documented reasons like genuine nonpayment of rent or a serious lease violation, even if you also happened to complain.

Build a paper trail

Put complaints in writing and keep dated copies, save any code-enforcement reports, and note the timeline between your complaint and the landlord's action. That record is what makes a retaliation defense credible if it ever reaches a court.

A quick example

Say a tenant reports a broken heater to the city, and two weeks later gets a sudden eviction notice with no other explanation. In most states the close timing alone can raise a presumption of retaliation that the landlord then has to rebut.

Your next step

Start a Chat Find a Landlord-Tenant Attorney

More on this topic: the Landlord & Tenant hub

Sources & primary references

NotALawyer.com provides general legal information, not legal advice.