The boy, who was aged seven at the time, said Nyomi Fee, 29, stopped him breathing after kicking and punching him.
He claimed Fee made her civil partner 32-year-old Rachel Trelfa or Fee – Liam’s mother – join in on one occasion.
He said: “I was lying on the floor getting smacked and punched and she [Nyomi] put her foot on my neck and it made me unconscious for a while. I was choking and I couldn’t breathe. It was sore.
“When I woke up she was punching me on my back because I must have done something but I don’t know what.”
“When they both did it it was extra sore,” he said.
He demonstrated what had happened by pressing both hands to his throat.
The primary age youngster revealed details of the abuse during a filmed interview with a police detective and a social worker which was shown to the jury at the High Court in Livingston yesterday.
On another occasion he said he’d been tied up in a cot and Nyomi Fee caught him trying to escape.
He said she was angry that he’d been able to get out and she made him climb into a drawer, he claimed.
She put wire mesh, a wheelchair and a Hoover on top of him to stop him from escaping again, he said.
Rachel and Nyomi Fee deny murdering two-and-a-half-year-old Liam at a house near Glenrothes in March 2014. They also deny wilfully neglecting and harming two other boys.
Under cross examination the boy admitted he had packed a bag and some food as part of a plan to escape from the house because he was getting “bad treatment”.
Mark Stewart QC, defending Nyomi Fee, put to him: “The reason you were going to do that because you thought you were going to be in trouble because you’d hurt Liam.”
The boy answered: “That I’d hurt Liam? No. I tried to run away because I was getting bad treatment.”
“Do you remember trying to get him out of the cot?” He replied: “Maybe.”
“Do you remember he hurt himself when you tried to get him out of the cot?” “I think he did.”
Under questioning by Rachel Fee’s counsel Brian McConnachie he was quizzed about saying in an earlier statement he had been standing on Liam and making a “strangling” gesture to show what he had done.
He told the QC: “It might have happened. I really don’t know.”
The trial before Lord Burns continues.