A statement from the UN said: "WFP is forced immediately to suspend these distributions and the loading of WFP food from our warehouses in the Somali capital."
It said the move came "in the light of Mr Osman's detention and in view of WFP's duty to safeguard its staff".
Mohammed Adow, Al Jazeera's correspondent speaking from Nairobi, said: "A senior government official told me they had Mr Osman with them and the police were interrogating him, but they were not ready to give any more information.
"It is such arrests, and the complaints about humanitarian access, that have been a concern for many."
Peter Smerdon, a WFP spokesman, said in Nairobi confirmed that Osman was being detained in Mogadishu.
Exact circumstances
"WFP is urgently taking his detention up with the authorities," Smerdon said.
Barry Came, an agency spokesman at the WFP's headquarters in Rome, said the organisation was "still trying to ascertain the exact circumstances" of Osman's arrest.
In April, the interim government promised the UN it would clear obstacles to providing aid to thousands of Somalis uprooted by the conflict in the country.
But the WFP has said months of fighting between fighters and the joint Somali-Ethiopian forces has severely impaired aid deliveries.