"If left unchecked, synthetic drugs could have developed into the most dangerous drug crisis since methamphetamine labs found their way into our state," said the Republican governor, who was flanked by legislative supporters of the bill and a group of uniformed police officers as he signed the measure at a Capitol ceremony.
Corbett noted that the bill does not take effect for 60 days and urged retailers to suspend sales immediately.
"I am asking merchants who sell these chemicals today to stop voluntarily, before more people are hurt," he said.
The law will prohibit all chemical substances similar to bath salts as well as synthetic marijuana.
Bath salts sell for as little as $10 in certain stores and on the Internet. Despite their innocent-sounding name, they can cause delusional, violent behavior.
Corbett cited Pennsylvania cases in which people under the influence of bath salts had been involved in stabbings and an armed standoff with police.
"This bill, quite literally, will save lives," said Dauphin County District Attorney Edward Marsico, president of the Pennsylvania District Attorneys Association.
More than 20 other states have banned bath salts by law or regulation, according to the National Conference of State Legislatures.
In Pennsylvania, the city of Lock Haven and Centre, Columbia, Schuylkill, Luzerne and Lackawanna counties also have approved bans.