We analyze the effects of the North American Free Trade Agreement (NAFTA) and United States farm subsidies on U.S.-Mexican illegal immigration and agricultural trade. The theoretical analysis develops an integrated trade-migration model and shows that NAFTA and U.S. subsidies exacerbate the illegal labor flow and increase U.S. exports. The theoretical analysis is empirically implemented by simultaneous estimation and simulation analysis. The analysis shows that NAFTA increased the number of undocumented workers to U.S. agriculture and U.S. farm exports to Mexico by an average of 1573 and $6.82 billion, respectively. U.S. farm subsidy reduction decreases unauthorized entry marginally and U.S. farm exports by an average of $3.2 billion.