It was unclear whether those arrested had been involved in drug trafficking and decided to change track, or if they had merely got hold of the vessels for their operations.
A Civil Guard police union warned last month that narcos in the country's south had entered the lucrative trade of migrant trafficking, as more and more people try to reach Europe from Africa via Spain.
Police said the four detained allegedly led a gang in Ceuta that took Algerians who had already arrived in the overseas territory located in northern Morocco across the Mediterranean to the mainland.
Police said the gang charged between 1,800 and 2,000 euros per person for the trip, earning a profit of around 26,000 euros per vessel.
“Such were the profits of the organisation that its members found it better to devote themselves to this criminal field rather than that related to drugs,” they added in a statement.
Close to 40,600 migrants have reached Spain by sea since the start of the year with another 398 dying in the process, according to the latest figures of the International Organization for Migration.
That's more than triple the amount of people who arrived at the same period last year.