The aim of the present study was to investigate the effect of four local anesthetics on pain relief during surgical castration under standardized conditions in conscious piglets. Therefore, 71 male piglets (three to seven days) were distributed into control groups (handling, castration without anesthesia or analgesia) and local anesthetic trial groups (procaine, lidocaine, bupivacaine, mepivacaine). Then, 20 min prior to castration, animals of the treatment groups, except piglets in the handling group, received an injection of a local anesthetic or sodium chloride of 0.5 mL intratesticularly and 0.5 mL subscrotally. During injection and castration, defensive behavior was evaluated. Locomotor activity, as well as postoperative bleeding, wound healing and average daily weight gain were assessed to detect side effects. The injection caused increased defensive movements, significantly in the bupivacaine group. Lidocaine and mepivacaine significantly reduced defensive movements during castration, and procaine and bupivacaine only during severing of the spermatic cord. Impairments of locomotor activity were found in piglets injected with lidocaine, bupivacaine or sodium chloride. Considering healing, bleeding and weight gain, no negative impacts were observed. In conclusion, lidocaine and mepivacaine were able to achieve significant pain relief during the castration procedure, whereas procaine and bupivacaine only during the severing of the spermatic cord. Moreover, the injection of bupivacaine seemed to be painful itself.