Canadian defender Kobe Franklin's goal in the 78th minute gave Toronto the home victory and the group title to reach the knockout rounds.
The World Cup-style event features MLS and Liga MX Mexican sides in three-team groups with two clubs advancing from each to the knockout rounds.
US midfielder Derrick Etienne had given Toronto the lead in the 44th minute but Moroccan Oussama Idrissi equalized for Pachuca in the 59th.
Miami has been without Argentine superstar Lionel Messi with a right ankle injury suffered in his nation's Copa America final triumph last month over Colombia.
In Florida, 10-man host Orlando City clinched a group title by beating Atletico San Luis 5-4 on penalties after playing to a 1-1 draw.
Orlando lost US defender Kyle Smith to a red card in the 29th minute but the Lions got a goal from Argentine striker Ramiro Enrique in the sixth minute of first-half stoppage time.
San Luis answered on Rodrigo Durado's goal in the 71st minute but losing the penalties shootout eliminated the Mexican side, advancing Montreal to the knockout stage.
Mexico City side Cruz Azul, which played a goal-less draw with Charlotte and lost a penalties shootout, played Philadelphia to a 1-1 draw and then won a penalty kick shootout 5-3 over the host Union.
Argentine striker Carlos Rotondi scored for Cruz Azul in the 41st minute but the Union equalized in the 88th minute on a goal by Hungarian midfielder Daniel Gazdag.
Both advanced to knockout play.
Santos Laguna beat Atlanta United 5-3 on penalties after the clubs played to a goal-less draw, advancing the Mexican side into knockout play with Atlanta eliminated.
At St. Louis, Juarez beat the hosts 4-1 on penalties to win their group although both clubs have reached the knockout round.
Simon Becher scored for St. Louis in the 58th minute but Dieter Villalpando equalized for Juarez in the 62nd minute.