Zambrano had been in charge of the men's program since March 2017. Canada Soccer did not reveal the reason for the Ecuadorian's departure.
Herdman was also named the country's National EXCEL Director. He joins the men's team following several successful years with the women's national soccer team.
Canada has not qualified for the World Cup since 1986.
"We welcome John to this new role as he brings his success aligning Canada Soccer's Women's National Team Program over the past six years and his world-class technical coaching abilities to continue delivering results for Canada Soccer for the Men's National Team Program," Canada Soccer president Steven Reed said in a statement.
"We are pleased to have such a capable successor in Kenneth Heiner-Moller, who has been a key part of the technical staff that has seen Canada capture back-to-back bronze medals and rise to its highest-ever ranking of fourth in the world. On behalf of Canada Soccer, we would also like to thank Octavio for his contributions over the past year and wish him well in his future endeavours."
Under the England-born Herdman, Canada captured a pair of Olympic bronze medals. However, the nation finished sixth at the Women's World Cup when Canada hosted the competition in 2015.