The Egyptian bulk carrier, Wadi al-Arab, with 31 crew members, was passing through the Gulf of Aden between Yemen and Somalia on route to Asia when gun-toting pirates in a speedboat began pursuing it, said Noel Choong of the International Maritime Bureau's piracy reporting centre.
A passing ship alerted the Kuala Lumpur-based bureau, which asked a multinational naval coalition force in the area to help, Choong said.
In response, the German navy frigate Karlsruhe dispatched a helicopter, a military spokesman said on condition of anonymity, citing policy.
The pirates fled as the chopper reached the vessel, according to a statement from the German military, but not before shooting and injuring one of the ship's crew.
A second helicopter, carrying a medical team, retrieved the injured crew member, who is now receiving treatment on the Karlsruhe, the statement said.
After the attack, the Wadi al-Arab continued on its way to South Korea, where it was delivering 56,000 tonnes of wheat from Ukraine, Ahmed Rizq, Egypt's deputy foreign minister, said.
Somali pirates have attacked 110 ships in the Gulf of Aden this year, successfully hijacking 42.
Most were released after a ransom was paid, though 14, with more than 240 crew, are still being held.
Pirates have made an estimated $30 million hijacking ships for ransom this year.
More than a dozen warships are now patrolling the vast gulf.
Countries as diverse as Britain, India, Iran, America, France and Germany have naval forces in the waters or on their way there.