Scott Ostrem, 47, was taken into custody without incident a day after the shooting following a tip from the public, the Thornton Police Department said.
Police said they have yet to establish a motive for the rampage and that Ostrem had only “a minimal criminal history.”
Video broadcast from CBS affiliate KCNC-TV showed the suspect being handcuffed by police against the side of an SUV as FBI agents carrying rifles and wearing body stood by.
KCNC-TV said police SWAT team officers had ringed his last known address in suburban Adams County on Thursday morning when Ostrem drove past. He was followed by law enforcement and journalists, KCNC-TV reported, and was arrested in the nearby suburb of Westminster after a “quick pursuit.”
Police had earlier released a surveillance camera photograph of a middle-aged white man wearing a black jacket and blue jeans. They also published a photo of the red four-door Mitsubishi hatchback he was believed to be driving.
Ostrem “nonchalantly” entered the store in Thornton, about 10 miles (16 km) northeast of downtown Denver, and opened fire on shoppers and employees shortly after 6 p.m. (8 p.m. EDT) on Wednesday, police spokesman Victor Avila told reporters.
Two men were killed in the shooting and a woman who was shot was taken to a hospital where she died, according to police. No one else was wounded.
“What we have determined is that it is random as of right now,” Avila told reporters. “As witnesses stated, the person came in and just shot towards a group.”
The Walmart had been quickly surrounded by police and fire crews. Avila said there was no indication the shooting was an act of terrorism and no one had claimed responsibility.
“We can’t rule anything out,” he said.
Ostrem is due to appear on Friday morning in Adams County District Court, where he will be advised of the charges against him.
The victims were identified as Pamela Marques, 52, Carlos Moreno, 66 and Victor Vasquez, 26.
Walmart customer Aaron Stephens, 44, of Thornton told Reuters he was buying groceries at a self-checkout stand when he heard gunshots and ricocheting bullets.
“The employees started screaming and the customers started screaming” as people began to flee, he said. “I ran out, too, because I didn’t want to get shot.”
Early accounts of multiple casualties had revived painful memories for the Denver area, where a gunman killed 12 people in 2012 at a midnight screening of the Batman movie “The Dark Knight Rises” at a theatre in the suburb of Aurora. The shooter, James Holmes, is serving a dozen consecutive life sentences without the possibility of parole.
In 1999 two 12th-graders fatally shot 12 fellow students and a teacher at Columbine High School in suburban Jefferson County. The pair, Eric Harris and Dylan Klebold, then committed suicide in the campus library.