Historically land ownership, and extraction of tax/rents from tenants on that property and therefore the extraction of tenants from the property in event of non payment or other cause would have been by some combination of tradition and force.
What legal system first codified the concept of 'Eviction' as a legal process for a property owner to displace a tenant under a specific set of circumstances (such as non payment of rent) or alternatively make explicit protections for free(non serf) tenants?
Existing data points:
The Wikipedia page for eviction is focused on current rules, but the illustrations within it suggest 'eviction' as something that involved police/authorities (rather than hired thugs) from at least the 1800s.
For the UK there are Irish tenant acts from 1870, and the Evesham Custom formalized in 1880, the very titles of Evesham and Ulster customs would suggest a traditional rather than legal framework in the UK prior to that date.
Going further back in Europe there is the different legal frame work of land bonded Villeins/Serfs whose rights are outside the scope of this question.
A likely candidate would appear to be Roman law, with the large pool of city dwelling freedman, highrise multi tenant buildings, cash economy and comprehensive legal system.
This print book is paywalled but the public table of contents indicates that Roman real estate law existed and also appears to contain in an appendix an Egyptian 'eviction notice' which may be an even earlier Egyptian date.
China would also appear to be a likely candidate, though the Equal Field System and Well Field System appear to be working on a different structure that did not produce laws governing rents and tenancy.