The men were found to have collected "security information" against Hamas, including on the "structure and movements" of its militants, in cases dating back to 2014, the ministry said in a statement.
Three were jailed for life by the military court, while the rest received sentences ranging from seven to 15 years.
They were members of the Fatah-led security services.
Fayez Abu Eita, a spokesman for Fatah in the Gaza Strip, called the sentences "political and unjust".
A number of attempts at reconciliation between the two sides have failed.
The Palestinian Authority security forces in the West Bank, run by Fatah, regularly arrest Hamas members.