Between 1789 and 1863, Thanksgiving was held on different days, and sometimes different months. In 1863, President Abraham Lincoln proclaimed that it would be annually held on the last Thursday of November. Here are his words:
I do therefore invite my fellow citizens in every part of the United States, …to set apart and observe the last Thursday of November next, as a day of Thanksgiving... And I recommend to them that while offering up the ascriptions justly due to Him …, they do also, with humble penitence for our national perverseness and disobedience, commend to his tender care all those who have become widows, orphans, mourners or sufferers in the lamentable civil strife in which we are unavoidably engaged, and fervently implore the interposition of the Almighty Hand to heal the wounds of the nation and to restore it as soon as may be consistent with Divine purposes to the full enjoyment of peace, harmony, tranquility and Union.
You can read about the history of the proclamations of Thanksgiving here.