A written legal order requiring a specific action or inaction. For example, a writ of habeas corpus is a court order for a detaining authority to bring a detainee before the court in order to determine if the detention is legal. A writ of execution might direct a sheriff to give a plaintiff possession of property.