The man admitted to shooting the young woman with a pistol four times in the head, neck and back.
The motive for the killing was jealousy, as the man suspected his girlfriend of being unfaithful.
The murder took place in September last year in Sundbylille in the northern part of the Danish island of Själland.
The young woman was found with gunshot wounds in a car in the town. She was taken to hospital where she later died from her injuries.
In her dying words, the woman revealed the identity of her slayer, who was later arrested in Denmark after a search was carried out on both sides of the border.
The 22-year-old from north western Skåne confessed to buying a Hungarian FEG Frommer pistol for 6,000 Swedish kronor before arranging a meeting with his girlfriend.
He said that he had not intended to kill his former live-in girlfriend. His plan instead had been to take his own life if his girlfriend admitted to being unfaithful, he said.
He does not intend to appeal the verdict, according to Danish news agency Ritzau.