A picture of the child chained to the pipe circulated online and on social media.
The photograph led to calls for the freeing of the boy, the Gulf News said.
Eventually police found the boy's neighborhood and told the boy's mother they had to take him to the hospital.
The mother refused to let police take the boy.
She said she had never chained him to the pipe before and was punishing him for beating his half brother, authorities said.
After four hours of negotiations, the mother and boy were taken to the hospital.
Sources told the Gulf News that the mother will lose custody of her child if doctors find evidence of abuse.
Twerking Brooklyn burglar 'dropped it like it was hot' prior to theft
Ohio crash that killed two caught on camera [VIDEO]