Abdulrahim Omar, from Bedford, shaved off the 10-year-old boy’s hair because the boy had tried to use an electric razor on himself.
Omar apparently wanted to teach the boy a lesson about the danger of razors.
As he chopped off the hair, others watching the barber laughed.
The 10-year-old was subsequently left with ‘psychological and physical harm’, Luton Crown Court was told.
He was so upset when it happened, the youngster subsequently called the police. Omar was later arrested.
Prosecutor Alex Radley said: ‘The young man was proud of his hairstyle and felt that it was important to him. He suffered psychological and physical harm.’
Judge Richard Foster said the decision to chop off the hair was a ‘disgusting piece of humiliation’.
‘This offence was the premeditated humiliation of a 10 year old,’ said the judge.
‘It was despicable conduct to treat a child in that way. There is no excuse for what you did. It was a most disgusting piece of humiliation.’
Omar’s defence team said the barber had realised he had made a grave mistake and it was a one-off action.