The joint bid received 134 votes to 65 for Morocco.
The decision was revealed at the FIFA Congress in Moscow on Wednesday. The United States will host the remaining 60, including the final. In eight year's time, numerous young rising stars of the United States men's national team should be in their prime as it is expected to be the first World Cup with 48 teams.
But though US and Mexico have previous experience of hosting the event in 1994 and 1986 respectively, an expanded tournament across three host nations for the first time would appear to pose a major challenge.
The World Cup final will be held at MetLife Stadium in New Jersey, the home of National Football League teams the New York Giants and New York Jets.
Federation Internationale de Football Association will meet with the bid committee over the next two years to determine, by mid or late 2020, the North American cities that will stage the tournament's 80 matches. Mexico will host games for a record third time, after the 1970 and 1986 editions. All soccer venues are expected to be ready by the time the 2026 World Cup rolls around.
The decision will be a shot in the arm for football in the U.S., after the national team failed to qualify for 2018 in a huge setback for the game there. It will be the same for the 2022 tournament in Qatar. To counter concerns about severe travel, the bid said teams would be placed in regional clusters. It also has proposed not one traditional opening match but three (one in each nation).
While Morocco, as expected, obtained strong support in Africa, the United bid's power base in Central and South America, plus some welcome backing from parts of Europe and Asia, made the difference.
Trudeau told reporters in Ottawa: "It's an opportunity to bring the world together and highlight how well things work between Canada, Mexico and the United States".
The host team always qualifies for the tournament, but there are questions about whether or not all three countries will be given automatic berths.
The Canadian cities are Edmonton, Alberta; Montreal; and Toronto; and Mexico's are Guadalajara; Mexico City; and Monterrey. In the expanded competition, the Concacaf region, which represents North and Central America and the Caribbean, would still receive three additional slots, decided through the qualifying process, plus one team in an worldwide playoff. Cordeiro contradicted Infantino's statement on the conference call, saying that the decision will be made by Federation Internationale de Football Association. Canada qualified once, in 1986.
Two notable absences, Chicago and Vancouver, did not agree to Fifa's requirements for hosting games and withdrew from consideration.
The FIFA inspectors had deemed Morocco a "high risk" choice, describing the two bids as "almost at opposite ends of the spectrum".