Residents of Copenhagen's semi-autonomous Christiania neighbourhood are tearing down the hashish market in the hippie colony after an alleged drug dealer shot two police officers and a bystander.
The 25-year-old gunman escaped after the attack but was arrested following a shootout with police.
Authorities and his defence lawyer said he had died from his wounds.
The violence marked an escalation in clashes between police and drug dealers who sell hashish openly in Christiania, a largely self-governing enclave created when hippies occupied abandoned navy barracks in 1971.
Fed up with the violence, some of Christiania's 600 residents tore down the market stalls used by drug dealers in the infamous "Pusher Street".
Denmark's TV2 showed people using saws, cordless drills and crowbars to dismantle the stalls.
"It is important that we do this today with the wounded police officer in our thoughts," community spokesman Risenga Manghezi said.
"But we cannot guarantee that they won't pop up again, unfortunately."
Though many Christiania residents have liberal attitudes towards drugs, they are uncomfortable with the presence of criminal gangs running the hashish trade in the neighbourhood.
Authorities say the gunman, identified as Mesa Hodzic, a Danish national born in Bosnia, opened fire on two police officers as they tried to arrest him late on Wednesday. The gunman also shot a bystander in the leg.
One of the officers is in critical condition while the other and the bystander are stable, police said.
Police later shot Hodzic as they confronted him south of Copenhagen. He was taken to Copenhagen's university hospital, where he died from his wounds early on Friday, lawyer Jacob Kiil said.