Luton Crown Court was told the boy was also made to sweep up his cut hair.
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."
Ahtiq Raja, mitigating, said: "Mr Omar recognises he made a grave mistake. He fully understands it now. He is of previous good character and pleaded guilty at the first opportunity and is very, very sorry for his actions.
"He knows there is no excuse and knows what he has done is fundamentally wrong. The actions were a one off."
Jailing him, Judge Richard Foster said: "This offence was the premeditated humiliation of a 10 year old. It was despicable conduct to treat a child in that way."
He told him: "There is no excuse for what you did. It was a most disgusting piece of humiliation."