Governor Greg Gianforte signed the ban into law on Wednesday. It is due to take effect on 1 January.
The video-sharing platform says the ban "infringes on the First Amendment rights of the people of Montana".
TikTok has come under scrutiny from authorities around the world over concerns that data could be passed to the Chinese government.
Mr Gianforte, a Republican, told lawmakers that a wider ban would further "our shared priority to protect Montanans from Chinese Communist Party surveillance."
TikTok said in a statement that it was used by "hundreds of thousands of people" in Montana.
"We want to reassure Montanans that they can continue using TikTok to express themselves, earn a living, and find community as we continue working to defend the rights of our users inside and outside of Montana," it added.
TikTok is expected to challenge the legislation in the courts.
Last month, lawmakers in Montana passed a bill banning TikTok on personal devices by a vote of 54 to 43.
The law will make it illegal for app stores to offer TikTok, but does not ban people who already have TikTok from using it.
Montana, which has a population of just over 1m, banned the app on government devices last December.
TikTok says it has 150m American users. Although the app's user base has expanded in recent years, it is still most popular with teenagers and users in their 20s.
However, there are concerns across the US political spectrum that TikTok could be a national security risk.
TikTok is owned by ByteDance - a Chinese company.
In March, a congressional committee grilled TikTok chief executive Shou Zi Chew about whether the Chinese government could access user data or influence what Americans see on the app.
Mr Shou repeatedly said that it would never spy on Americans - despite admitting that employees had used the TikTok accounts of journalists to obtain information about them.