The rush happened in the city's Hassan II mosque, which was full of worshippers on Monday evening.
It was the holiest night of the Muslim fasting month of Ramadan, the Moroccan news agency reported.
It quoted officials as saying that the injured were mostly women who suffered light injuries and fractures.
Worshippers were reported to have fainted after a mouse crossed over a woman's foot while she was praying, causing her to rush outside and creating panic among worshippers, Morocco World News reported.
The Hassan II mosque is believed to be the largest in Africa and the seventh largest in the world.
Its minaret is 210 m (689 ft) high.
A mouse is responsible for triggering a stampede in a mosque in the Moroccan city of Casablanca which left more than 80 people injured, officials say.