2-Alkoxy-3-cyano-4,6-diarylpyridines 1a,b which were synthesized by condensation of alpha,beta-unsaturated ketones with malononitrils were subjected to Lewis acid-catalyzed nucleophilic displacement reaction with various amines to afford the corresponding 2-aminopyridines 3-21. The potency of the results as antibacterial agents has been evaluated. The structure of the newly prepared compounds was assessed by microanalysis, IR, and NMR spectra. Molecular modeling and QSAR methods are used to study the antibacterial activity of the active compounds by means of the molecular mechanic method.