The 29-year-old from Münster was hit by a steel shard from the condom dispenser which was positioned on a quiet street, local police disclosed on Monday.
Along with two friends, aged 27 and 29, the man had attached a homemade explosive device to the machine in an apparent attempt to get at the goods and money inside.
But he was unable to make it to safety in time, with the door of his car still open as the device detonated. The shard of metal then struck him in the head, leaving him unconscious.
His two accomplices took the man to hospital but he died of his wounds shortly afterwards.
At first the men claimed their friend had injured himself after falling down the stairs, before one later admitted to the connection to the exploded machine.
Police confirmed that the men did not take the money or condoms which had been set loose by the explosion. After being alerted by local residents, officers found the contents of the machine scattered on the street in front of it.
The two survivors of the incident were arrested before later being released from custody.