The attack at a King Soopers market in Boulder ended when police arrested the lone suspect after exchanging gunfire.
Police have not confirmed a motive. The suspect faces 10 counts of murder.
President Joe Biden has hailed a police officer and father of seven who was killed, and has called for Congress to enact stricter gun control measures.
The grocery store is located in a busy shopping plaza in Boulder, a north-central Colorado city about 30 miles (50km) away from the state capital of Denver.
It comes less than a week after a mass shooting that left eight dead, including six Asian women, at three spas in Atlanta.
President Biden on Tuesday renewed his call for a ban on assault weapons and high-capacity magazines as well as an end to loopholes in background checks.