I assume this is a Maryland issue. In Maryland, a person doing home improvement work must be licensed. Acting without the required license is a criminal offense that carries a fine and jail sentence. Additionally, the Home Improvement Commission may impose a civil penalty of up to $5000. More than 35 years ago, as a very young lawyer, I had a client who was in the position of your boyfriend. He had done about $40,000 improvement work for his girlfriend. My client's wife found out about his affair, came to the girlfriends house and stood outside and called for him to come out. He didn't at which point she keyed his beloved Aston Martin that was parked outside. I have to hand it to his wife who got her husband back. Afterwards, he hired me to go after his girlfriend for the money he had spent. It was then that I found out that licensing provisions come in 2 forms - those for the raising of revenue for the State and those for the protection of the public. The Home Improvement license is for the protection of the public. If that is the purpose of the licensing statute, our courts hold that it is against public policy to aid the unlicensed person in recovering such compensation. This is from a 1970 Maryland appellate case dealing with a claim for a mechanis lien: "We, and our predecessors, have held that if a statute requiring a license for conducting a trade, business or profession is regulatory in nature for the protection of the public, rather than merely to raise revenue, an unlicensed person will not be given the assistance of the courts in enforcing contracts within the provisions of the regulatory statute because such enforcement is against public policy." Harry Berenter, Inc. v. Berman, 258 Md. 290, 293, 265 A.2d 759, 761 (1970)
So, your boyfriend may try to claim a lien, but under our law he won't be able to get it unless no one brings the issue to the attention of the court.
In my state there is stong legislation against unlicensed contractors. He would be chased out of court trying to collect. Problem time and materials is not defined as a contract requiring licensing. No lien but he mIght sue for his time. You counter for reasonable rent.
If he is crazy and you have fear consider a protective order.
In addition to the license requirement, a home improvement contract must be in writing and contain certain provisions set forth by MD law. Additionally, assuming the agreement for your boyfriend to work on your basement was made in your home (rather than your boyfriend's usual place of business), you have a 3-day right of rescission. If you did not receive notice of that right, the 3-day period will not expire. That means, you could give him notice of cancellation tomorrow. If your boyfriend does try to put a lien on your house, consult an attorney.
This should not be construed as formal legal advice or the offer of the formation of an attorney/client relationship. There is no substitute for taking the time to consult directly with an attorney regarding your specific legal needs and issues.