The body of Daniel Smith, 23, was discovered by firefighters in a homeless camp under a railway bridge in Irwell Street, Salford, on 20 January.
Adam Acton, 24, and Luke Benson, 25, attacked Mr Smith after he accidentally "urinated on bedding within the camp", the Crown Prosecution Service said.
The pair were jailed for life at Manchester Crown Court on Thursday.
Acton and Benson, both of no fixed address, attempted to dispose of the body of Mr Smith by setting fire to him.
Senior Crown Prosecutor Gail O'Brien said the men "carried out a brutal and sustained attack on Daniel" and showed "no remorse throughout the case".
"Their attack was utterly disproportionate to the disagreement they had had with him. They also attempted to cover their tracks by taking Daniel's belongings from him, destroyed them and hiding them from the police," she said.
Mr Smith was hit with a hammer, a bat and a broom handle, which was later found broken in two, police said.
Emergency services were called after flames and smoke were seen in the camp, where Mr Smith was found with serious injuries to his face and body.
Supt Emily Higham paid tribute to a witness "who had the courage to come forward" to talk about the men's "horrifying actions".
Benson was ordered to serve a minimum jail term of 20 years and 165 days, while Acton was given a minimum of 21 years and 166 days.
He also received 12 months to run concurrently after pleading guilty to perverting the course of justice for removing and hiding Mr Smith's Sim card.
Acton's girlfriend Amanda Briggs, 28, and a 17-year-old male pleaded guilty to perverting the course of justice for their role in removing, damaging and concealing items belonging to Mr Smith.
Two men have been jailed for the murder of a fellow rough sleeper who they beat before setting him on fire in his tent.