After the Civil War Abraham Lincoln was just the first of many US Presidents to encourage immigration through economic and politic measures (one of them was to give free land to anyone willing to work it). The country needed people to rebuild itself and to settle the west of the continent. And everyone was aware that there is plenty of space.
The Chinese Exclusion Act, a United States federal law signed by President Chester A. Arthur on May 6, 1882, prohibiting all immigration of Chinese laborers.