Egypt last year imposed a strict zero tolerance policy on ergot in grain shipments that wreaked havoc on its ability to purchase from abroad after traders boycotted state wheat tenders when shipments began being rejected.
Egypt later adopted a more common international standard permitting up to 0.05 percent in shipments. The row over ergot limits focused on wheat, though the rules also apply to corn.
Egypt is the world's largest buyer of wheat but also a significant importer of corn. It purchased 8.5 million tonnes of corn last year, the ministry said.
Dayim said the Ukrainian corn contained ergot over the 0.05 percent limit and will be re-exported to Spain.
Egypt's government won a court case last month that awarded it greater authority to oversee the import inspection process.
"Naturally there is nervousness about any drift back towards the zero tolerance ergot policy... There is a feeling of uncertainty in the market," one European-based grains trader said.