Danish police confirmed one civilian had been killed and said the two suspects had fled in a car after the attack on the gathering, which had been billed as a debate on art and blasphemy.
Vilks and the French ambassador, who was also attending, were both unharmed.
“The security guards shouted ‘everyone get out’ and we were being pushed out of the room,” Helle Merete Brix, organizer of the event, told Reuters by telephone.
“They tried to shoot their way into the conference room,” she said. “I saw one of them running by, wearing a mask. There was no way to tell his face. I’m not even sure if there was one or two.”
French ambassador Francois Zimeray tweeted that he was “still alive in the room”.
“They shot us from outside the building, it was the same intention as for Charlie Hebdo, except that they couldn’t get in,” French news agency AFP quoted him as saying.
Police commander Henrik Blandebjerg told local TV there were two assailants. The dead civilian man was 40 years old. Police with searchlights scoured the area for evidence and said a getaway car was found 10 minutes away on the outskirts of the capital.
Sweden’s security police said Swedish bodyguards were with Vilks at the time of the shooting.
Authorities in southern Sweden said they were helping Danish police. Sweden is joined to Denmark by bridge, and transit across is largely unchecked.
Danish police said they did not know whether the incident was a “terrorist act” but were investigating it as one.
Just over a month ago, 17 people were killed in France in three days of violence that began when two Islamist gunmen burst into the Paris offices of the satirical weekly Charlie Hebdo, opening fire in revenge for its publication of satirical images of Prophet Mohammad (PBUH).
Vilks stirred controversy in 2007 with published blasphemous drawings which sparked threats from Islamist militant groups.
He has received numerous death threats and has lived under the constant protection of the Swedish police since 2010. Two years ago, an American woman who called herself Jihad Jane was sentenced to 10 years in prison for plotting to kill him.
The scene of the shooting was a cafe at a cultural center in a central part of Copenhagen.
French President Francois Hollande said Interior Minister Bernard Cazeneuve would go to the Danish capital as soon as possible.
Danish newspaper Jyllands-Posten published blasphemous caricatures by various artists in 2005, provoking protests across the Muslim world in which at least 50 died and death threats against the cartoonists.