Police say the men killed from seven to ten people during the crossing after a fight broke out on board the vessel.
When weather conditions worsened during the night a Nigerian priest began to pray out of fear. The two Cameroonians took this to be the cause of the bad weather and allegedly began to beat the man as well as several other Nigerian passengers with wooden boards placed at the base of the vessel.
They then pushed an unknown number of people into the water, having robbed them of up to €1,500 ($1,750) beforehand, Spain's El Mundo newspaper reported.
The ship eventually reached the Spanish coast but with only 29 of the original 50 passengers on board. Those who were not pushed from the vessel are believed to have fallen overboard in high seas.
Seven babies lost their lives during the crossing, Spain's Red Cross believes.
Survivors were taken to a refugee interment centre in Almeria, with three witnesses eventually telling police what had happened on board.
Staff at the centre had previously noted that those survivors kept their distance from the two Cameroonians.
Spain's maritime rescue services last year came to the aid of 3,500 migrants found on boats off the country's coast, the government said on Wednesday, a 55-percent increase from the previous year.
A total number of 2,253 people were rescued in 2013, according to a spokesman for the maritime service.
Despite the dangers involved, thousands of migrants fleeing war and hardship try to cross the 15-kilometre (nine-mile) Strait of Gibraltar from Morocco to Spain on makeshift boats and inflatable dinghies each year, making Spain one of the main entry points into Europe for illegal migrants.