The anti-terror operation was carried out in the Spanish cities of Alicante and Valencia and in the Spanish autonomous city of Ceuta in North Africa, the ministry said in a statement.
The seven detained were part of a cell which was providing logistical support to ISIS and the al Nusra Front in Syria, according to the statement.
That logistical support included shipping military supplies, money, and electronic and communications equipment, the statement said. The cell also shipped firearms and precursor materials used in manufacturing explosives, it said.
Spanish authorities said the supplies were packaged to look like humanitarian aid and then shipped from Spanish ports to Syria and Iraq.
"These continuous shipments directly favored the continuity and the reinforcement of terrorist structures in Syria and Iraq," the ministry said.
Spanish authorities said besides providing logistical support, the leader of the cell was in constant contact with an ISIS member, "who asked him on numerous occasions to recruit women to travel to Syria" for marriage to ISIS fighters.
"ISIS wants them to be mothers to the next generation of fighters," said Paul Cruickshank, CNN terrorism analyst. A significant number of women have also traveled with their husbands, he said. An estimated 500 women have traveled from the West to join jihadi groups, he said.
Five of the arrested men have Spanish nationality but are of Syrian, Jordanian and Moroccan origin, according to the ministry's statement. Two others are Syrian and Moroccan nationals living in Spain.
Authorities began investigating the group's activities in 2014, according to the Interior Ministry.
"In total, twelve searches were conducted at the homes of those arrested, as well as in the places and warehouses where they conducted their illegal businesses," the statement said.
Video from the region shows heavily armed police conducting raids in buildings and emerging with suspects and boxes of evidence. One video from Ceuta shows a car stopping outside a shuttered kebab shop. Police wearing balaclavas pull out a person in handcuffs, open the shutters and take him inside.
This is the second anti-terror operation on Spanish soil this year, according to data from the Spanish Interior Ministry.
Since the beginning of 2015, 83 people have been arrested in Spain for suspected links to terrorist organizations.
Between 2011 and late 2015, about 125 Spanish nationals and residents are believed to have gone to Syria and Iraq as foreign fighters, according to Fernando Reinares, director of the Global Terrorism Program at Elcano Royal Institute in Madrid.