Anesthesia serves as an effective method to mitigate the stress response in aquatic animals during aquaculture and product transportation. In this study, we assessed the anesthetic efficacy of clove oil, tricaine methane-sulfonate (MS-222), ethanol, and magnesium chloride by anesthesia duration, recovery time, 24-hour survival rate, and the behavior of mud crabs (Scylla paramamosain). Additionally, the optimal anesthetic concentration for varying body weights of mud crabs was also investigated. The results revealed that clove oil emerged as the optimal anesthetic for mud crabs, with a 24-hour survival rate surpassing those observed in MS-222 and magnesium chloride treatments. Ethanol caused amputation and hyperactivity in mud crabs. Regression analyses between the optimal anesthetic concentration of clove oil and the weight categories of 0.03–27.50 g and 27.50–399.73 g for mud crabs yielded the following equations: y = 0.0036 x3 − 0.1629 x2 + 1.7314 x + 4.085 (R2 = 0.7115) and y = 0.0437 x + 2.9461 (R2 = 0.9549). Clove oil exhibited no significant impact on serum cortisol, glucose, lactate content, aspartate aminotransferase (AST), alanine aminotransferase (ALT) activities, or superoxide dismutase (SOD), catalase (CAT), glutathione peroxidase (GSH-Px), and malondialdehyde (MDA) levels in mud crabs across different treatment groups. Anesthesia induced by clove oil in mud crabs resulted in an increase in inhibitory neurotransmitters such as glycine. However, the recovery from anesthesia was associated with elevated levels of the excitatory neurotransmitters L-aspartic acid and glutamate. In conclusion, clove oil proves to be a safe and optimal anesthetic agent for mud crabs, exerting no physiological stress on the species.