Pain was implicated in many diseases. Despite effectiveness to treat moderate to severe pain, opioid analgesics elicited many side effects, greatly limiting their prescription in clinics. Based on M1, an active metabolite of tramadol, 3-((dimethylamino)methyl)-4-(3-hydroxyphenyl)piperidin-4-ol analogues were designed, synthesized, and evaluated in vitro. Among all the compounds tested, compound 23 was found to be a novel, highly selective, and potent MOR agonist (K i MOR = 0.0034 nM, EC 50 MOR = 0.68 nM, E max = 206.5%; K i DOR = 41.67 nM; K i KOR = 7.9 nM). Structure−activity relationship exploration showed that the linker between the piperidine ring and the phenyl ring as well as substituent pattern of the phenyl ring played a pivotal role in binding affinity and selectivity. (3R, 4S)-23 (K i MOR = 0.0021 ± 0.0001 nM, EC 50 MOR = 0.0013 ± 0.0001 nM, E max = 209.1 ± 1.4%; K i DOR = 18.4 ± 0.7 nM, EC 50 DOR = 74.5 ± 2.8 nM, E max = 267.1 ± 1.4%; K i KOR = 25.8 ± 0.2 nM, EC 50 DOR = 116.2 ± 4.4 nM, E max = 209.5 ± 1.4%) had more potent activity for opioid receptors than its enantiomer (3S, 4R)-23 and was found to be a potent, highly selective MOR agonist with novel scaffold. High binding affinity and selectivity of (3R, 4S)-23 for MOR over KOR and DOR and its mechanism of activating MOR were proposed by docking and molecular dynamics simulations, respectively.