The academics have been charged with incitement to debauchery, gender discrimination and violence against women. They have not yet pleaded.
This is the latest sexual harassment scandal to hit a Moroccan higher education institution.
However, it is rare for a case to be brought to court.
The lecturers are from the Hassan I University in the city of Settat, about 80km (50 miles) south of the main city, Casablanca.
A fifth lecturer is facing charges of indecent assault and battery.
The story came to light in September through the leaking on social media of messages that are said to have been between the lecturers and students.
The current case is different in that it has actually been brought to court – most reported incidents have not made it that far, he adds.
Rights groups say this is symptomatic of a society in which sexual violence remains widespread and many women do not feel confident in reporting their experiences through concerns over possible reprisals or the perceived damage to their reputation and that of their family.