We compared the analgesic efficacy and pharmacokinetics of 2 and 4 mg·kg-1 tramadol in goats undergoing surgical castration. Twenty-two adult goats were randomly assigned to three premedication groups: six animals received 2 mg·kg-1 of tramadol, eight received 4 mg·kg-1, and the control group consisted of eight animals that received 5 mL of saline solution intravenously. Analgesia was evaluated using the Adami pain scale. Rescue analgesia (2 mg·kg-1 ketoprofen) was intravenously administered. Venous blood samples were collected from all groups to determine the drug pharmacokinetics at 0, 5, 15, 30, and 45 minutes, and at 1, 2, 4, 6, 7, 8, 9, 10, 12, 16, and 24 h. Analysis of variance was used (P < 0.05) for statistical analyses. Overall, animals treated with tramadol exhibited lower pain scores than those in the control group, indicating that tramadol undergoes rapid metabolization and clearance. Pharmacodynamic and pharmacokinetic assessments demonstrated that 2 and 4 mg·kg-1 tramadol were effective in relieving pain in goats undergoing castration and should be administered every 6 (half-life = 2.71 ± 0.38 h) and 8 (half-life = 3.75 ± 0.36 h) hours, respectively. These data serve as a basis for further research into analgesic use and provide information on prescribing tramadol in ruminants.