Abdelghani Mzoudi, 32, was acquitted by a Hamburg court in February 2004 of charges he helped September 11 hijackers Mohamed Atta, Marwan al-Shehhi and Ziad Jarrah in their plot.
He faced charges of more than 3000 counts of accessory to murder and membership of a terrorist organisation.
After his acquittal was upheld this month, Hamburg's top security official, Udo Nagel, said his office was still ordering him to be expelled because it "stands by its view that Mzoudi threatens the free democratic order and supports terrorist organisations".
Mzoudi drove from Hamburg with four friends to Hanover's airport before dawn for an early flight on Tuesday that was to take him to Agadir, Morocco, later in the morning.
Meeting his attorney Michael Rosenthal, who was to accompany him on the flight, he made no comment to reporters.
A man identifying himself as a Hamburg immigration official presented Mzoudi's passport at check-in, saying he would return it once Mzoudi was inside the restricted area.
Ahead of his departure, his other attorney, Guel Pinar, said Mzoudi was looking forward to getting back to Marrakesh, where his family lives.
"He's happy he's going to see his family again," she said.
Pinar said Mzoudi plans to continue his electrical engineering studies that were interrupted by his 2002 arrest.