If they choose, the parties can address the security deposit in their divorce, and then execute a document in association with their divorce judgment that instructs the landlord to pay the deposit to the ex-spouse who remains in residence. They should discuss this plan with the landlord so that he knows what they intend and can get any needed clarification.

Basically, the security deposit may be assigned in the divorce as an asset of the spouse who remains in the rental property, with the spouse who moves out receiving a similarly valued asset (or cash) to balance things out.