Jack Harry Stiles, 42, told investigators that he planned to "randomly shoot and kill people" on Wednesday, the anniversary of his mother's death.
A hospital crisis counselor alerted police on August 12 to Stiles' threats. It was not revealed why Stiles was in the hospital in the first place.
The suspect planned to open fire at City Creek shopping center, the $1.7 billion centerpiece of Salt Lake City that spans two city blocks, charging documents say.
He also told investigators he planned to shoot "people's heads off" at a movie theater across town, and then wire a bomb underneath a transit bus.
His plan was to carry five extra magazines, and he had "scoped and mapped out the best spots" for hiding to "kill the most amount of people," charging documents say. They didn't say why Stiles wanted to do it, whether he offered a reason, or why the anniversary of his mother's death was a motivating factor.
Court documents show Stiles didn't have any weapons but was planning to buy two guns with silencers and stock up on ammunition.
Investigators couldn't say whether Stiles was capable of carrying out his plan, but they decided to take the threat seriously in the wake of the recent Washington, D.C., Navy Yard shootings, officials said.
Family members told investigators the man had a history of mental illness and making threats,
"He was fixated on multiple locations, mapped them out and was revisiting those locations," the Salt Lake County district attorney said Tuesday. "We couldn't take the risk. He could do anything."
Stiles remained in custody Tuesday on $1 million bail, and had not secured a lawyer, according to Salt Lake officials.
The Associated Press contributed to this report.