The District of Columbia Municipal Regulations Chapter 14-3 Section 310, 310.1-310.4 allows for a landlord to perform an inspection of the premises at the end of tenancy for the following reason:
Inspection of Premises for Return of Security Deposit
In order to determine the amount of the security deposit or other payment to be returned to the tenant, the owner may inspect the dwelling unit within three (3) days, excluding Saturdays, Sundays, and holidays, before or after the termination of the tenancy.
The owner shall conduct the inspection, if the inspection is to be conducted, at the time and place of which notice is given to the tenant.
The owner shall notify the tenant in writing of the time and date of the inspection.
The notice of inspection shall be delivered to the tenant, or at the dwelling unit in question, at least ten (10) days before the date of the intended inspection.
DCMR § 14–310, 310.1-310.4.
See also DC Landlord Returning a Security Deposit.