The ship, the MV Rozen, had just delivered a cargo to Somalia's Puntland region when the pirates struck, a World Food Programme official said.
There have been no reports of demands from the pirates and it is not known if any of the 12 crew have been injured.
Piracy has become rampant off the coast of Somalia, which has had no stable central government for years.
A World Food Programme spokeswoman, Stephanie Savariaud, said there were deep concerns for the safety of the crew.
"We know it has been hijacked by pirates but we do not know how many pirates there are," she said.
Ms Savariaud said the Rozen had delivered 1,800 tonnes of food aid to the semi-autonomous Puntland region of Somalia and was returning to its home port of Mombasa in Kenya.
From BBC News