Giuseppe Pecoraro admitted pouring petrol on Marcello Cimino and setting him alight outside a mission run by Capucin monks in Palermo, Sicily.
Mr Pecoraro, a petrol pump attendant, thought the victim was pursuing his wife, local police said.
Video footage captured Mr Pecoraro pouring a bucket of petrol on Mr Cimino's bedding while he slept.
Neighbours reported hearing Mr Cimino screaming in pain. He died before emergency services arrived.
The attacker burned his hands in the blaze. He was arrested on Saturday, less than 24 hours after the crime.
He told police he had burned his hands on a coffee maker, Italy's La Repubblica reported, but later confessed to murder.
Palermo Mayor Leoluca Orlando described the murder as an "act of pure barbarism" and said he would lower the town hall flag to half-mast.
La Repubblica obtained leaked video footage of the crime, prompting a separate police investigation into the leak.
Mr Pecoraro has been charged with murder.
An Italian who fatally set fire to a homeless man has confessed to murder, saying he was motivated by jealousy.