The attack took place in Lower Kenyon Street, Thorne, yesterday morning while two bin men were in the middle of their round.
Onlookers said three men pulled up in a car, attacked the bin men then sped off from the scene.
One of the bin men suffered serious injuries in the attack, including slash wounds to his head.
Some residents who went to his aid climbed under the bin lorry he was slumped under to try to stem the bleeding before paramedics arrived to take over.
One woman said witnesses to the attack said it was terrifying.
"When I heard what had happened I went outside and saw that people were ringing the police. Then I saw a bin man under the truck covered in blood," she said.
"It was all over his head and face and the ground around him but thankfully he was conscious.
"The other bin man said he was just hit on his arm so he was fine, but the one on the ground had two slash marks to his head and one under his chin. He said he had seen the machete but hadn't thought he had been slashed with it, but looking at his wounds he obviously had.
"He was complaining more about his leg being in pain and apparently he was hit in his back with a hammer.
"People who saw it happen said it was terrifying."
She said residents were horrified at the attack.
"I can't believe that this would happen in broad daylight on a street where there are lots of kids," she said.
"Because of all the weapons the attackers had I am glad nobody challenged them or tried to stop them or who knows what might have happened to them as well."
She said the seriously injured bin man was taken to hospital by ambulance while police officers sealed off the crime scene.
A police cordon remained in place until around 7pm last night while a forensic examination took place and inquires were carried out in the street.
Police officers investigating the attack have asked residents in the area to check their CCTV cameras.
South Yorkshire Police has been approached for a comment.