If your spouse has a history of substance abuse or mental illness, has engaged in domestic violence or criminal conduct, or has abandoned you and your children, you may want to take steps to protect them if you die unexpectedly.
Normally, if one parent predeceases the other, custody of the children automatically moves to the living parent. In some instances, such as those just mentioned, this may not be a good idea. You can have your attorney prepare a Will that appoints a guardian for your kids, and draft papers that cite specific evidence as to why a judge should award custody to the guardian instead of your ex-spouse.
For example, you may select your mother, father or a sibling as the guardian. Courts attempt to do what is in the overall best interests of any child, so whether the request in the Will is granted depends on the quality of proof you supply in accompanying papers, and the relative fitness of the guardian you've named versus your ex-spouse.
Generally, there's no guarantee as to what a judge will do in this scenario. When a custodial parent dies, it is hard to stop a biological parent from getting custody of children unless there's a very compelling reason.
Alternatively, in certain circumstances, your attorney may be able to negotiate or petition the court for a guardian to be appointed in advance, and make it part of your settlement agreement.
Guardianships can be a complex matter, so whatever you decide, be sure to address it with your lawyer first, before mentioning it to your spouse.