The shooter was the only person with a gun, and no police officers fired a weapon, according to Lt Derik Zimmel.
"We do not believe there is any further risk to the public," Zimmel said. He provided no details of what led to the shooter's death.
One other person was taken to a hospital with gunshot wounds that were not believed to be life-threatening, Zimmel said.
Police did not provide information about the gunman or victims. Grand Forks Air Force Base issued a statement saying an airman was involved in the shooting, but did not elaborate. Officers responded to reports of gunshots a few minutes after 1 am (local time).
He said when the group later left the building they passed a Wal-Mart employee who was covered in blood. Police were investigating to determine a motive in the shooting, he said.
Wal-Mart spokesman Brian Nick said in a statement that about 30 employees were in the store at the time of the shooting. He said not many customers were there because of the early hour.