The preceding years have brought an exponential increase in our understanding of the endocannabinoid system (ECS), including the knowledge of CB1 and CB2 cannabinoid receptors, endocannabinoids, and the enzymes that synthesize and degrade endocannabinoids. Among these ECS components CB2 receptors have been the subject of considerable attention, primarily due to their promising therapeutic potential to treat numerous pathologies while avoiding the adverse psychotropic effects that can accompany CB1 receptor–based therapies. Recently, our research group has reported a new series of non-cytotoxic benzo[d]imidazoles and benzo[b]thiophenes displaying high CB2/CB1 selectivity index. In order to investigate the structural requirements for CB2 ligands and to derive a predictive model that can be used for the design of novel selective CB2 ligands, a three-dimensional quantitative structure-activity relationship (3D-QSAR) study was performed on the above mentioned chemical series employing comparative molecular field analysis (CoMFA) and comparative molecular similarity index analysis (CoMSIA) techniques. The CoMFA and CoMSIA models displayed high external predictability (rpred2 0.919 and 0.908) and good statistical robustness. Valuable information regarding the steric, electrostatic and hydrophobic properties of the molecules was obtained, and several modifications around both heterocycles were evaluated with the aim to generate new promising series of benzo[d]imidazoles and benzo[b]thiophenes derivatives displaying high CB2 selectivity and low toxicity.