It was called the Smith-Mundt Act. This law allowed the US government to spread "public diplomacy" (broadly speaking, is the communication with and dissemination of propaganda to foreign public to establish a dialogue designed to inform and influence.)
The Smith-Mundt Act (while allowing the government to spread propaganda outside the US) made it illegal to spread propaganda within the US and to it's own citizens. But the law was changed with the Smith-Mundt Modernization Act of 2012.
The Smith-Mundt Modernization Act of 2012, which was contained within the National Defense Authorization Act for Fiscal Year 2013 (section 1078 (a)) amended the United States Information and Educational Exchange Act of 1948 and the Foreign Relations Authorization Act of 1987, allowing for materials produced by the State Department and the Broadcasting Board of Governors (BBG) to be available within the United States.
TIL - It used to be illegal for the US government to spread propaganda to its own people. But it's not illegal anymore.