The stampede occurred around 1:00 pm Sunday while traditional food was being handed out to people attending an event to commemorate a late religious leader, Xinhua news agency said, citing the local government.
The injured were hospitalised, with four in critical condition, the brief report said.
An investigation was under way into the cause of the stampede at the mosque in Xiji town, some 320 kilometres (200 miles) northwest of Xian.
Ningxia region is home to the Chinese-speaking Hui minority, who are mostly Muslim but distinct from the Uighurs of Xinjiang.
Located on the upper reaches of the Yellow River, the semi-desert region was the scene of a Muslim rebellion in the 19th century but has no recent history of ethnic tensions or other strife between the Hui and the Han majority.
In contrast, restive Xinjiang has seen several deadly clashes between Uighurs and security forces in recent months which the authorities in the remote northwest region have blamed on separatist "terrorists".
Ningxia is seeking to develop its fledgling winemaking industry which has already attracted the likes of French luxury group LVMH, owner of Dom Perignon champagne among other brands.