How do you go about filing a motion to modify a custody order?

You MUST know the law of the state in which the original custody order was entered. You may need to proceed in that state. In most states a change of custody can only occur if a parent can show a change of circumstances that directly affects the well being of the child. Some states will allow you to proceed without a lawyer if both parents agree to a particular change. The clerk of court or another judicial office may have forms to be completed and presented to a judge. The judge can then enter an order to make the change permanent. If the parents cannot agree, or the state does not allow you to proceed without an attorney, then you need to find an attorney. You will need to explain to the attorney why things have changed so dramatically that the custody of the children should be disturbed. You should be aware that some states will not allow any change of custody within a specified time period from the original decree.