Hunnam, 36, could not make it to the project due to scheduling conflicts, reported Entertainment Weekly.
Drake Doremus-directed movie will also star Lea Seydoux.
"Zoe" reportedly revolves around two colleagues who, at their revolutionary research lab, design special technology to enhance their love lives.
McGregor will next be seen in two films opening on March 17, including "Beauty and the Beast" remake and Danny Boyle's 'Trainspotting' sequel "T2".
He is also scheduled to appear on the third season of FX's "Fargo" in April.