Hello, I am a solicitor with 20 years experience. I will try to answer this for you.
This will depend on the terms of your agreement and the terms of the notice. What does your tenancy or lodger agreement say about notice and how is the notice to quit/seeking possession phrased
Is there any notice period requirement in the "move in contract"?
Looking at that it seems to me that you have done nothing wrong he has given you a last day not a date that the agreement ends, so it seems you can leave whenever you want based on that. I take it you were a lodger and therefor the landlord didn't need to put the deposit in a guarantee scheme, but how is the deposit described in the agreement. Usually they are for damage beyond normal wear and tear. If so then your landlord is not able to hold onto the money to recoup the rent he wants.
I think if this is described as a security deposit ( a meaningless phrase in law) then they can use this against unpaid rent (but see above there is no unpaid rent).
The best way to get leverage here is to deduct the deposit from your last rent payment, but it may be too late for this now.
The legal position seems to be that you have to leave some time before the date on the notice and you are entitled to get your deposit back If necessary, you can threaten or bring a claim in the small claims court for the deposit.