Check the following
https://www.thoughtco.com/history-of-income-tax-in-u-s-1779205
In the 1890s, the U.S. federal government was beginning to rethink its general taxation plan. Historically, most of its revenue had been from taxing imported and exported goods as well as taxes on the sale of specific products. Realizing that these taxes were increasingly bearing on only a select portion of the population, mostly the less affluent, the U.S. federal government began looking for a more even way to distribute the tax burden.
Thinking that a graduated-scale income tax placed upon all citizens of the United States would be a fair way to collect taxes, the federal government attempted to enact a country-wide income tax in 1894. However, because at that time all federal taxes had to be based on state population, the income tax law was found unconstitutional by the U.S. Supreme Court in 1895.
To create a permanent income tax, the Constitution of the United States needed to be changed. In 1913, the 16th Amendment to the Constitution was ratified. This amendment eliminated the need to base federal taxes on state population by stating: "The Congress shall have power to lay and collect taxes on incomes, from whatever source derived, without apportionment among the several States, and without regard to any census or enumeration."
In October of 1913, the same year the 16th Amendment was ratified, the federal government enacted its first permanent income tax law.