A practical, efficient and inexpensive method for the synthesis of 2-oxazolines and 2-imidazoline from the reaction of nitriles with β-aminoalcohols and ethylenediamine (EDA), respectively, using silica sulfuric acid as a heterogeneous catalyst under reflux conditions is reported. This catalyst can be successfully applied for the chemoselective conversion of dicyanobenzenes to their corresponding mono- and bis-oxazolines. The application of ultrasonic irradiation improved the yields and reduced the reaction times. The use of silica sulfuric acid catalyst is feasible because of its easy preparation, easy handling, stability, easy recovery, reusability, good activity and eco-friendly.