This study aimed to evaluate dexmedetomidine as an alternative to xylazine in pigs. We compared TKD (0.05 mL/kg) to TKX (0.05 mL/kg) in 20 male pigs undergoing unilateral cryptorchid castration (short-term, 45-min) or bilateral cryptorchid castration (long-term, 90-min). We hypothesized that TKD would be comparable to TKX for both short-term and long-term anesthesia. Monitored parameters were classified into duration and physiological categories, including induction and recovery times, reflexes, heart rate (HR), respiratory rate (RR), arterial blood pressure, oxygen saturation (%SpO2), end-tidal carbon dioxide (ETCO2), and body temperature (TEMP). Isoflurane levels were also recorded, if used. Results showed no significant differences in duration parameters between TKD and TKX for either short-term or long-term anesthesia (induction: 1 min; recovery: 18–35 min). Physiological parameters were mostly similar between groups, although TKD caused slightly higher blood pressure during short-term anesthesia. Isoflurane levels (0.1–0.6%) were comparable between groups. Overall, the results suggest that TKD provides anesthesia comparable to TKX in pigs undergoing unilateral or bilateral cryptorchid surgery requiring short-term and long-term anesthesia.