On June 19, 1862, Congress passed and Lincoln quickly signed a law prohibiting slavery in the current and future Territories of the United States:
Be it enacted by the Senate and House of Representatives of the United States of America in Congress assembled, That from and after the passage of this act there shall be neither slavery nor involuntary servitude in any of the Territories of the United States now existing, or which may at any time hereafter be formed or acquired by the United States, otherwise than in punishment of crimes whereof the party shall have been duly convicted.
APPROVED, June 19, 1862.
There doesn't seem to be much interest in this historic event, but it appears that the act was a direct shot at the Dred Scott decision from five years earlier. The Emancipation Proclamation would follow a few months later.