Madsen was born in 1971 to Annie and Carl Madsen. He lived his first years in Sæby and Høng (both in Kalundborg Municipality), Denmark. Annie was more than 30 years younger than Carl and had three other boys from two previous husbands. Carl was allegedly abusive toward his three stepsons. Annie left when Peter was 6, taking the children with her. After a couple of years, Madsen returned to his father, with whom he shared an interest in rockets.
While attending primary and secondary school in Høng, Madsen developed an interest in rocket fuel with the help of chemistry and physics teacher Johannes Fischer. He developed his first large rocket at Høng and launched it on 3 March 1986. It was one meter tall, modelled after the American ICBM MX Peacekeeper and built in his father's workshop. It reached a height of 100 m (330 ft) before crashing without harming anyone. In 1987, Madsen was accepted at the gymnasium (upper secondary school) in the nearby town of Kalundborg. He moved to live in a youth house in the town. His father died in 1990 when Peter was 18.
Madsen continued to experiment and to consult engineers, and became friendly with the family responsible for the fireworks in Copenhagen's Tivoli Gardens. He also joined the Dansk Amatør Raket Klub (DARK) rocket club in Copenhagen, but the other members gradually became disillusioned with him. DARK members claimed that "saying his name would start the fire sprinkler system". He never finished any formal education, but took courses in welding and engineering to learn something about submarines. His enthusiasm brought impressive results, but also caused conflicts with others. Madsen funded his lifestyle through financial support from people, organizations, and enterprises which saw promise in him.
In June 2014, Madsen established RML Spacelab ApS. The goal was the development and construction of a crewed spacecraft. From 2016, RML was developing a nano satellite launch vehicle using venture investments. Under the title Raket-Madsens Rumlaboratorium (Danish for Rocket-Madsen's Space Laboratory) Madsen has blogged about his activities on the web-site of the Danish news magazine Ingeniøren. Madsen became CEO of the company.[not in citation given]
On 11 August 2017, Madsen was arrested after the sinking of UC3 Nautilus and the disappearance of Kim Wall, a Swedish journalist who had last been seen alive aboard the submarine.
The following day, a court ruled that he be held in pre-trial detention for 24 days on a charge of negligent homicide. Madsen initially claimed that he disembarked Wall on land at the tip of Refshaleøen on the night before the sinking. He later changed his statement, saying that she had died on board in an accident, and that he had buried her at sea. According to the Danish police, the submarine was deliberately sunk, contradicting Madsen's explanation regarding a technical fault.
A human torso washed up on the coast of Amager on 21 August, which DNA tests concluded belonged to Wall. Chief investigator Jens Møller reported that the torso had been stabbed multiple times to vent accumulating gases that could float it to the surface, and that a piece of metal had been fastened to it to ensure its sinking to the seabed. On 25 August, Madsen's charge was extended to improper handling of a corpse.
During a hearing on 5 September, Madsen stated that Wall had been killed when he lost his grip on the submarine’s hatch cover, which he was holding open for her, and it hit her on the head, causing her skull to fracture. On 7 October 2017 Royal Danish Navy divers assisting the police found Wall's head and legs, along with a knife and pieces of her clothing, in bags at the bottom of Køge Bay, weighted down by bits of metal. A police spokesperson reported that there were no fractures to Wall's skull.
A post-mortem examination of the torso found "knife wounds to her genitals and ribcage", believed to have been caused "around or shortly after her death". On 30 October 2017 it was reported that Madsen had changed his account of Wall's death and admitted dismembering her body.
It was reported that he now claimed that she had died from carbon monoxide poisoning on board the submarine, but his legal representation denied this, saying that Madsen did not know how she died. It was later confirmed by the police that he had made no clear statement on how she had died, but had said that she was inside the submarine when it contained exhaust gases.
In January 2018 Madsen was charged with murder, indecent handling of a corpse (due to dismemberment), and sexual assault (due to stabbings in genital region). The prosecution accused him of having bound, hit, cut and stabbed Wall before killing her by cutting her throat or strangling her.
Madsen's trial began on 8 March 2018 with him pleading not guilty to Wall's murder. On 25 April 2018 Madsen was found guilty of all charges, and sentenced to life imprisonment. A psychiatric evaluation of Madsen described him as a narcissisticpsychopath, lacking in empathy but not psychotic or delusional.
Madsen immediately appealed the sentence but not the guilty verdict. On 26 September 2018, the Østre Landsret (High Court of Eastern Denmark) upheld the life imprisonment sentence.
Madsen was married at Copenhagen City Hall in November 2011. His wife had worked in the film industry and had also helped in Madsen's workshop at Refshaleøen, Copenhagen. In February 2018 it was reported that his wife had abandoned him. Madsen himself explained that he had lived in an "open relationship". His wife has chosen to remain anonymous and her identity has not been released by the media.