The coffin was on top of two motorbikes and although it is not known where the video was taken, social media users have speculated it was shot in Venezuela or Colombia.
It is believed mourners decided on the bizarre homage because the dead man was a reggaeton fan.
The video, posted on Facebook under the title "When Brayan dies", features a dance hit by raggaeton singer Alexio.
One social media user said: "This video has got to be kept so that some intelligent species in the future (if there is going to be one) studies how mankind has come close to extinction."
But Sebastian Soto joked: "I wouldn't have any problem with two girls dancing like that for me, dead or alive.
In December two women thought to be teachers were criticised after appearing to twerk at a children's party in Peru.
The women were filmed thrusting their pelvises suggestively, touching the boys and then making them hug the lady dancers from behind as they twerked their backsides as a clown shouted into a microphone.