The hosts advanced to the last 16. Paraguayan midfielder Rojas opened the scoring in the third minute for Miami and compatriot Diego Gomez gave a 2-0 lead in the 11th minute.
Italian striker Lorenzo Insigne converted a penalty kick for Toronto in the 15th minute, but Luis Suarez answered for Miami in the 20th minute, with the Uruguayan forward giving the hosts a 3-1 edge. Inter Miami lost defender Hector Martinez to a red card in the 28th minute.
Insigne struck again from the spot in the 41st minute to lift Toronto within 3-2 at half-time. Rojas struck again in the 59th minute, with Spanish defender Jordi Alba picking up his fourth assist of the contest as Miami stretched the lead to 4-2.
Toronto pulled within the final margin on an own goal by Miami defender Noah Allen in the 79th minute, but the visitors could not manage an equalizer.