Is my spouse legally responsible for returning my house key after they move out?
I have not been retained as your attorney so I cannot give you legal advice. However, I can offer some general information that may help you.
If Maryland is similar to the state that I am licensed to practice in, Arkansas, whether or not your spouse has to return the house key depends on where you are procedurally in the divorce and what any outstanding court orders, if any, say.
If there is a final order (divorce decree) that has awarded the home to you, then the house key will likely have to be returned to you since, I assume by these facts, you are not giving your spouse permission to have a key or to be in the home. If there has been no final order and you and your spouse are separated, then you and your spouse both have claim to the house until and unless a court order says otherwise.
Of course, if there is a court order that says you have the house temporarily or that any keys need to be returned to you, then this order is controlling.