A combined experimental and computational study has been applied in order to understand the effect of the addition of subsequent methyl groups to chiral (1R,2S)-(-)-ephedrine on its structure-directing behavior during crystallization of the nanoporous 3 AFI aluminophosphate. Results show that bare ephedrine and the double-methylated N,N-dimethyl-ephedrinium display the most efficient structure-directing abilities, while the mono-methylated derivative shows a poor structure-directing capacity towards this framework. Fluorescence spectroscopy indicates that confinement of the mono-and dimethylated derivatives within the nanopores of the AFI channels involves a preferential incorporation of the SDA molecules as monomers. In contrast, occlusion of the bare ephedrine can lead to a strong supramolecular aggregation, depending on the synthesis conditions. Molecular simulations suggest that the stronger trend of ephedrine to form supramolecular aggregates when confined within the AFI channels is due to the formation of two intermolecular H-bonds between consecutive molecules in the dimers interface, which balances the strong electrostatic repulsion between closely-located positive charges of the N atoms under this supramolecular arrangement. The addition of subsequent methyl groups reduces the possibility of establishing these interdimer Hbond interactions that stabilize dimers while provoking steric repulsions, thus reducing the supramolecular aggregation.