The young boy from Saudi Arabia, who has not been named, had pain on his upper right abdomen and between his ribs and hip, and irregular fever for three months.
Following admission to another medical facility, the boy had an X-ray of his abdomen which revealed the hair pin in the boy's right upper abdomen.
Graphic images below.
The story was published in a BMJ Case Report, highlighting the rare complications following the ingestion of foreign objects.
After the hair pin was found, the four-year-old admitted to swallowing it around one month before his symptoms started. His parents were reassured that this would pass through his system.
However, the boy's pains continued, and a later CT scan revealed the hair pin had gone through to his right kidney.
Doctors who treated the boy explained the ends of the hair pin had rusted and become sharp, then pierced through the first section of the small intestine and deep into his kidney.
Surgery was performed to remove the hair pin, and the boy made a full recovery. He was discharged from the hospital seven days after the removal.
His dad said: "First, when my son started to complain, I and most of the doctors who saw him were not worried because he did not show any alarming symptoms.
"But once I was informed that my son had a ‘bobby pin’ stuck in his kidney and that he would need an operation, I started to blame myself for that delay in management. I appreciate for the great effort made by the surgical team in treating my little child.
"I promise to be more aware of my children’s behaviour."
The authors wrote: "It is common for children to swallow small objects and these usually pass harmlessly through the gastrointestinal tract.
"Coins and bones are the most commonly ingested and complications are rare, for example, in this case."
However, they urged parents to be aware the dangers these small objects can have if swallowed.
You can read the full case report here.