A witness, who cannot be named, told the inquiry his friend was kicked on the body and head by the Catholic sister.
He was giving evidence at the Scottish Child Abuse Inquiry which began the second phase of its hearings in Edinburgh on Tuesday.
It is hearing evidence about institutions run by the Daughters of Charity of St Vincent de Paul.
The man said he was sexually abused by a nun and another member of staff and beaten for bedwetting and not eating his food at Smyllum Park orphanage in Lanark, Lanarkshire.
The witness entered the orphanage in 1959 when he was aged around two, along with three brothers and a sister.
He said that beatings at the institution were routine, and that on one occasion when he was aged around six his friend was beaten after playing with a match and accidentally burning his hand.
He said: "It was unfortunate but at that time the sister came around the corner and said what's wrong and I said 'he burned my hand' and she just grabbed him and started hitting him and punching him.
"He was on the floor and she was kicking him on his body and his head.
"I said 'please sister, please don't hurt him'.
"She stopped when I lay on top of him."
He said he next saw his friend in the sick room and the inquiry heard the boy was in hospital for around 10 days before he died.
A BBC and Sunday Post investigation earlier this year found that at least 400 children from Smyllum Park are thought to be buried in an unmarked grave at the town's St Mary's Cemetery.
The orphanage was home to more than 10,000 children between opening in 1864 and closing in 1981.
Prosecutors have said there is no evidence that a crime has been committed at the orphanage in relation to reports of the mass grave.
The witness also told how he was sexually abused by a nun who took him to her room and rubbed his penis with her thumb while talking to him about bedwetting.
He also described abuse by a lay female member of staff.
The witness said: "She took me up to the bedrooms to help change the beds.
"She sat on the bed and opened her legs and she had a split in her ski pants and she told me to get my penis out, put it in there and go in and out.
"I cannot remember any penetration.
"She lay back on the bed and just said keep going in and out."