Clinically used amino-ester and amino-amide local anesthetics, such as bupivacaine and lidocaine, face two primary challenges: inadequate duration of action and nonselective action on both sensory and motor neurons, resulting in motor function loss alongside pain relief. In this work, we developed capsaicin-loaded melanin nanoparticles (Cap-MNPs) to address these two challenges. Capsaicin selectively acts on sensory neurons without affecting motor neurons, thereby achieving nociceptive-selective nerve blockade. Melanin is known for its exceptional biocompatibility, biodegradability, and abundance in pigmented human tissue. Melanin's inherent chemical structure and hydrophobic nature enable the encapsulation and sustained release of amino-ester and amino-amide local anesthetics with aromatic rings through π−π interactions and hydrophobic interactions. The drug loading efficiency of Cap-MNPs was 82.99 ± 1.55%, the drug loading capacity was 67.47 ± 4.24%, and capsaicin was continuously released for more than 360 h. In rats, a single injection of Cap-MNPs containing 8.04 mg of capsaicin produced a sciatic sensory nerve block lasting for 6 h without causing any local toxicity and capsaicin-related systemic toxicity. Cap-MNPs show promise as clinically useful therapeutics for pain management.