A 3D-QSAR (CoMFA) study was performed in an extensive series of aminoalkylindoles derivatives with affinity for the cannabinoid receptors CB1 and CB2. The aim of the present work was to obtain structure-activity relationships of the aminoalkylindole family in order to explain the affinity and selectivity of the molecules for these receptors. Major differences in both, steric and electrostatic fields were found in the CB1 and CB2 CoMFA models. The steric field accounts for the principal contribution to biological activity. These results provide a foundation for the future development of new heterocyclic compounds with high affinity and selectivity for the cannabinoid receptors with applications in several pathological conditions such as pain treatment, cancer, obesity and immune disorders, among others.