The HC bench of Justice M Enayetur Rahim and Justice Md Mostafizur Rahman also directed them to carry out the order within three months.
The HC bench came up with the order after hearing a writ filed in the form of public interest litigation by advocate Esrat Hassan.
Besides, the court issued a rule asking the authorities concerned to explain as to why the inaction of the respondents to protect students from ragging would not be declared illegal.
Home and Education secretaries, chairman of the University Grants Commission have been made respondents to the rule.
Earlier on October 9, the lawyer sent a legal notice to the respondents to bring an end to ragging at educational institutions.
The notice asked them to take necessary steps within seven days to form anti-ragging committees to help students round the clock and anti-ragging squads to monitor.