Measuring signal propagation through nerves is a classical electrophysiological technique established decades ago to evaluate sensory and motor functions in the nervous system. The whole-nerve preparation provides a valuable model to investigate nerve function ex vivo; however, it requires specific knowledge to ensure successful and stable measurements. Although the methodology for sciatic nerve recordings has long existed, a method for reliable and long-lasting recordings from myelinated and non-myelinated (nociceptive) fibers still needs to be adapted for pharmacological testing. This protocol takes benefits from epineurium sheath removal for pharmacological tests and provides a detailed description of how to make accurate nerve preparations, from the dissection and handling of nerves to epineurium cleaning, fabrication of adaptable suction electrodes for appropriate fiber stimulation and recordings, setting of electrophysiological protocols for compound action potential (CAP) recordings to distinguish between myelinated and non-myelinated (nociceptive) fibers, and finally to the analysis of the datasets of CAP components. We also demonstrate the feasibility of CAP recordings from individual branches in epineurium-free nerve preparations and provide clues to help retain nerve viability and maintain stable recordings over time. Although a sciatic nerve preparation was used here, the methodology can be applied to other nerve-type preparations. Key features • Detailed and simplified protocol for peripheral nerve preparation for recording sensory inputs ex vivo. • Recordings from myelinated and non-myelinated (nociceptive) fibers can be performed hours after nerve preparation. • The protocol involves the epineurium removal to facilitate drug permeability into nerve tissue for pharmacological tests. • The protocol allows physiological and pathological studies (pain/chronic pain conditions).