A lawyer may file a motion to quash if a mistake has been made on the part of a court, or if an attorney believes that the issuance of some court document like a subpoena was not done in a legal manner. For example, a party that receives improper service of process may file a motion to quash.