Neuropeptide FF receptors (NPFF1R and NPFF2R) and their endogenous ligand Neuropeptide FF have been shown previously to display anti-opioid properties and to play a critical role in the adverse effects associated with chronic administrations of opiates including the development of opioid-induced hyperalgesia and analgesic tolerance. In this work, we sought to identify novel NPFF receptors ligands by focusing our interest on a series of heterocycles as rigidified non-peptide NPFF receptor ligands, starting from already described aminoguanidine hydrazones (AGH's). Binding experiments and functional assays highlighted AGH 1n and its rigidified analog 2-amino-dihydropyrimidine 22e for in vivo experiments. As earlier shown with the prototypical dipeptide antagonist RF9, both 1n and 22e reduced significantly the long lasting fentanyl-induced hyperalgesia in rodents. Altogether these data indicate that AGH rigidification maintains nanomolar affinities for both NPFF receptors, while improving antagonist character towards NPFF1R.