chalk it up for a life lesson and keep your word. Your word was to pay someone to complete work that he said he could do. His job was to satisfactorily complete the work. If the guy did a terrible job, then pay him what his work was worth. If you had to pay someone to come fix his crappy work, then deduct that from what you were going to originally pay him. The fact that he is illegally really has nothing to do with it. I am sure you knew that when you hired him, so that shouldn't be a reason to not pay him. But, it also doesn't mean that you have to pay him no matter what because you gave your world. I guarantee everyone one here who said "you gave your word" wouldn't be saying that if they had to pay double to get work done.
An agreement is only binding if both parties keep their word. If one party breaches the agreement, damages are incurred. Secondly, if the guy is not a contractor or even legal, his lien rights are non existent.