A simple, facile, and efficient procedure for the synthesis of 2-arylthizolines and 2-arylimidazolines has been developed by the simple condensation of nitriles with 2-aminoethanethiol or ethylenediamine catalyzed by 1,3-dibromo-5,5-dimethylhydantoin under solvent-free conditions. Selective preparation of bisthiozolines and monoimidazolines from dinitriles and also selective conversion of arylnitriles to their corresponding 2-arylthiazolines or imidazolines in the presence of alkylnitriles can be considered as considerable advantages of this method.