The shortest distance from Montreal, Quebec to the United States border is approximately 45 kilometers (28 miles) — measured due south to the 45th parallel north (the Canada–US boundary in this sector).
Cornwall, Ontario / Massena, NY (via A-30 / NY-37) is the nearest major port of entry:
Montreal sits at ~45.5° N; the border is at 45.0° N. The St. Lawrence River runs just south of the city, but the international boundary cuts across land south of the river.
For Americans: Montreal is the closest major Canadian city to the US Northeast — closer than Toronto (500 km) or Quebec City (250 km).