The incident took place in Klampenborg to the north of the Danish capital just after 7pm on Sunday, North Zealand Police confirmed.
After a man parked his car, an Audi, near his home, he was approached by two men each carrying a pistol, police said.
He was forced to hand over the keys to the car, which the two men then used to drive from the scene.
“One of them said ‘give me everything you have!’,” North Zealand Police superintendent Allan Lørup said.
The car owner was confronted by the weapon at a distance of no more than one metre and was struck on the head before being forced to relinquish the keys.
The robbery took place at 7:22pm.
Police have called for potential witnesses to come forward, including those who might have seen a dark blue Audi driving away from the area near Strandvejen and Teglgaardsvej.
According to the description provided by the police, one of the men is 20-25 years old, around 190-195 centimetres in height, slender and of African appearance.
The man, who spoke Danish, was wearing a hoodie or rain jacket that was fastened around the face.
The second robber was not as tall as his accomplice. No further description of him is given in the police daily report.
The two men arrived at the scene in a smaller car, but it is uncertain whether they had followed the Audi prior to the carjacking, Lørup said on Monday afternoon.