Acid-sensing ion channels (ASICs) are proton-evoked sodium ion channels, highly distributed in the peripheral and central nervous system. ASICs are involved in pain perception, and ASIC3 channel is presumed as the target of promising analgesics. Peptide drugs have attracted the attention of pharmaceutical developers because of their advantages such as low toxic side effects and targeted specificity. Although numbers of chemicals acting on ASICs are emerging, there are limited reports on peptide inhibitor acting on ASIC3 channel. Here, we found that spider-derived peptide LCTx-F2 suppressed the activity of ASIC3 channel in a concentration-dependent manner. By performing peptide mutation and molecular docking, we revealed the molecular mechanism of LCTx-F2 inhibiting ASIC3 channel, in which β-hairpin of LCTx-F2 penetrated the acidic pocket of the channel. Similarly, LCTx-F2 also inhibited ASIC1a channel by occupying the acidic pocket, but N terminus of the peptide sticked into the region. The bond relationship between critical residues of LCTx-F2 and the channels was uncovered by molecular docking and dynamic simulation. Thus, our findings indicated the molecular mechanism by which LCTx-F2 acts on ASIC3 and ASIC1a channels and provided a novel template of analgesic drug targeting the channels.