A new set of 5-chlorobenzoxazole- and 5-chlorobenzothiazole-based derivatives containing the azepane ring as a basic moiety was designed, synthesized and evaluated through binding assays to measure their affinity and selectivity towards σ<sub>1</sub> and σ<sub>2</sub> receptors. Compounds 19, 22 and 24, with a four units spacer between the bicyclic scaffold and the azepane ring, showed nanomolar affinity towards both receptor subtype and the best K<sub>i</sub> values (K<sub>i</sub> σ<sub>1</sub> = 1.27, 2.30, and 0.78 and K<sub>i</sub> σ<sub>2</sub> = 7.9, 3.8, and 7.61 nM, respectively). Evaluation of cytotoxic and apoptotic effects in MCF-7 human cancer cells was useful to assess σ<sub>2</sub> receptor activity, while an in vivo mice model of inflammatory pain allowed to analyze σ<sub>1</sub> receptor pharmacological properties. In vitro and in vivo results suggested that compound 19 is a σ<sub>1</sub>/σ<sub>2</sub> agonist, compound 24 a σ<sub>1</sub> antagonist/σ<sub>2</sub> agonist, whereas compound 22 might act as σ<sub>1</sub> antagonist/σ<sub>2</sub> partial agonist. Due to their pharmacological profile, a potential therapeutic application in cancer of aforesaid novel σ<sub>1</sub>/σ<sub>2</sub> receptor ligands, especially 22 and 24, is proposed.