Targeted muscle re-innervation (TMR) is a surgical procedure which involves transferring amputated nerves to activate the remaining muscles in the limb. This has been shown to be an effective way to cure or prevent neuroma pain (sometimes called "phantom" pain). The surgery also allows enhanced control of myoelectric (sometimes called "bionic") prostheses to perform new functions since there are more muscle signals available in the residual limb. For upper extremity amputees, this can mean far greater control of the elbow, wrist, and hand when using a myoelectric prosthesis.
See it in action here