The news ended fears of a new confrontation between activists and the Israeli navy, which had threatened to use force if the ship attempted to enter Gaza directly.
The Kadhafi Foundation, the Libyan charity that chartered the vessel, said it obtained guarantees from Cairo and from a "European mediator" that Israel would allow the ship's cargo of 2,000 tonnes of food and medicine into Gaza.
Libya also received permission to "spend 50 million dollars towards housing construction in the Gaza Strip by winter", said Yusef Sawan, the charity's executive director.
He added the foundation would also provide 500 prefabricated homes.
Earlier, Egyptian foreign minister Ahmed Abul Gheit said Cairo received a request for the Amalthea to deliver its cargo through Egyptian territory.
"As soon as the ship arrives in El-Arish, Egyptian authorities will unload its cargo and hand the aid to the Egyptian Red Crescent, which will deliver it to the Palestinian side", he said.
Eight Israeli warships followed the Amalthea throughout Wednesday as the ship dealt with engine failures and wavered over its course.
"Out of concern for the security of everybody on board, the foundation decided to head for El-Arish", Sawan said.
Port officials said they expected the Amalthea to be unloaded on Thursday.