A Danish frigate intercepted the men's high-speed boat as they prepared to board the Samanyolu after attacking it with automatic weapons and rockets, according to the prosecution.
Witnesses for the prosecution have claimed that the group sped up to the cargo ship in a small boat with a rocket launcher and automatic rifles on board.
"I saw that one of the men had a rocket launcher in his hands," the cargo ship's first machinist told investigators in a statement read out by Jan Willem Klein Wolterink, the presiding judge.
He said the men shot at the ship with assault rifles and later "I saw the rocket launcher being aimed at the bridge".
"I saw it go off, but it missed. I feared for my life," he said.
Yusuf, 25, said he and his co-accused never fired any shots at the Samanyolu.
Alongside Abdirisaq Abdulahi Hirsi, 33, Sayid Ali Garaar, 39, Jama Mohamed Samatar, 45, and Osman Musse Farah, 32, Yusuf was apprehended in the Gulf of Aden in January 2009.
All the suspects, who face jail terms of up to 12 years, deny the charges.
"I committed no crime. I did not attack anyone. I did not do anything," Hirsi told the court.
"I am the victim here," said Garaar. "They destroyed my boat and put my life in danger."
Garaar urged Wolterink not to allow another postponement of the trial.
"If our children are hungry, who is responsible?" he said.
"I don't know who is still alive and who has died. You sleep in your house while I have no country, no family. I have nothing."
The Netherlands issued European arrest warrants for the five men three weeks after their arrest on January 2 last year.
They were flown on a military plane from Bahrain the following month to the Netherlands, where they have been in custody ever since.
The trial is expected to last five days and judgement is set to be handed down on June 16, Vincent de Winkel, a spokesman for the Rotterdam court, told the AFP news agency.
According to the London-based International Maritime Bureau, which monitors maritime crime, pirates attempted 215 attacks on merchant ships off the Somali coast in 2009.
Last Tuesday, a Yemeni court sentenced six Somali pirates to death and jailed six others for 10 years each for hijacking a Yemeni oil tanker and killing two cabin crew in April last year.