The suspect, Martez Abram, was shot by an officer and hospitalized, Desoto County District John Champion said. Abram has been charged with two counts of murder, he said.
The victims were "senselessly murdered" at a store in Southaven, about 13 miles south of Memphis, at about 6:30 a.m. local time, Southaven police chief Macon Moore said. A fire was also reported at the store, said Champion.
Officers arrived within minutes, and when police confronted the suspect outside the Walmart, one officer was shot by the suspect, officials said.
The officer was saved by his bulletproof vest and is now in the hospital recovering, Moore said.
Abram was a former Walmart employee who was recently fired, Champion said.
"There was an incident" between Abram and another employee "a few days prior," Champion said, and Southaven police filed a report.
Champion did not elaborate on the alleged incident but Southaven Mayor Darren Musselwhite described it as a "grievance with an employee and his employer."
A spokesperson for Walmart, however, said that Abram was an existing Walmart employee, who had been temporarily suspended over the earlier grievance. The spokesperson did not elaborate on the nature of the grievance.
Abram, 39, has no criminal history, Champion said.
"The entire Walmart family is heartbroken by the loss of two valued members of our team," Greg Foran, president and CEO of Walmart U.S., said in a statement.
"We feel tragedies like this personally, and our hearts go out to the families of our two associates and the officer who was injured," Foran said. "We are relieved the suspect was apprehended, and we appreciate the quick response of the local authorities and our associates. We’ll continue to focus on assisting law enforcement in their investigation and on supporting our associates."
The victims' names have not been released.
Moore credited an active shooter training session two weeks ago that he said "no doubt" "saved lives today."
The Southaven Police Department is handling the criminal investigation into the assault on Walmart employees while the Mississippi Bureau of Investigation will examine the officer-involved shooting, said Moore.