Interior Minister Gerard Collomb wrote in a tweet early on Saturday that Colonel Arnaud Beltrame had “died for his country”.
Col Beltrame offered himself up unarmed to the 25-year-old attacker in exchange for a female hostage.
He managed to surreptitiously leave his cellphone on so that police outside could hear what was going on inside the supermarket.
Officials said once they heard shots inside the market they decided to storm it, killing the gunman.
Col Beltrame was grievously injured, and his death raises the toll from the attack to four.
The Islamic State group claimed responsibility for the attack, the deadliest since Emmanuel Macron became president last May.
“Arnaud Beltrame died in the service of the nation to which he had already given so much,” President Emmanuel Macron said in a statement. “In giving his life to end the deadly plan of a jihadi terrorist, he fell as a hero.”
According to the statement, Beltrame joined the elite police special forces in 2003 and deployed to Iraq in 2005. He served as a member of the presidential guard and in 2012 earned one of France’s highest honors, the Order of Merit. He was married with no children.
Macron has said investigators will focus on establishing how the gunman, identified by prosecutors as Morocco-born Redouane Lakdim, got his weapon and how he became radicalized.
On Friday night, authorities searched a car and the apartment complex in central Carcassonne where Lakdim was believed to live.
Lakdim was known to police for petty crime and drug dealing. But he was also under surveillance and since 2014 was on the so-called Fiche S list, a government register of individuals suspected of being radicalized but who have yet to perform acts of terrorism.
Despite this, Paris prosecutor Francois Molins said there was “no warning sign” that Lakdim would carry out an attack.