Synthesis and pharmacological evaluation of a series of condensed quinoline and pyridine derivatives bearing a N-methylpiperazine moiety attached to the 2-position of the quinoline or pyridine nucleus are described. 5-HT receptor binding studies revealed subnanomolar affinity for the 5-HT3 receptor subtype in some of the compounds under study. The most active compound (5b) displayed a Ki value about 1 order of magnitude higher than that of quipazine along with a higher selectivity. The potential 5-HT3 agonist/antagonist activity of four selected compounds was assessed in vitro on 5-HT3 receptor-dependent [14C]guanidinium uptake in NG 108-15 cells. Compound 5j acted as a 5-HT3 agonist in this assay with an EC50 value close to that reported for quipazine, while 5b was a partial agonist with an EC50 value of about 0.25 nM, and compound 5c possessed antagonist properties with an IC50 value (approximately 8 nM) in the same range as those of previously characterized 5-HT3 receptor antagonists. Qualitative and quantitative structure-affinity relationship studies carried out by making use of theoretical molecular descriptors allowed to elucidate the role of the main pharmacophoric components and to develop a model for the interaction of the 5-HT3 ligands related to quipazine with their receptor.