In a non-binding text adopted on Thursday, MEPs urged Morocco to "respect freedom of expression and media freedom" and to "guarantee imprisoned journalists... a fair trial".
Two of the most prominent cases in Morocco are those of Omar Radi and Soulaimane Raissouni, both sentenced on appeal last year on sexual abuse charges.
Radi, arrested in 2020, was also accused of "espionage". He denies the accusations.
Radi's father told AFP on Thursday that the vote "confirms that these are attacks against journalists aimed at silencing them".
Driss Radi, who is also a member of a committee to support the detainees, reiterated "our call to release journalists and social activists and guarantee them the right to fair trials, of which they have been deprived".
Rabat did not immediately react to the EU parliament's vote, but Moroccan pro-government media labelled it "interference" and "blackmail".
The European Union's top diplomat Josep Borrell earlier this month visited Morocco, where Foreign Minister Nasser Bourita said the country was facing "repeated media attacks" and vowed to "defend the partnership" with the EU.
MEPs said Radi's right to a proper defense was not respected, and accused the trial of being "unfair and biased".
They also called for an "end to harassment of journalists in the country".
Reporters Without Borders (RSF) said the EU Parliament vote was a break with "25 years of passivity".
"The European Parliament has put an end to an annoying tendency to exempt Morocco from any comment on its attacks on freedom of the press and human rights," it said in a statement.
Morocco ranks 135th out of 180 countries on the group's 2022 World Press Freedom Index.
The European Parliament on Thursday condemned what it described as a decline in press freedom in Morocco and said it was "concerned" by corruption allegations against Rabat.
STRASBOURG, FRANCE —