Star Arvizo, who claims he saw the singer twice molest his brother Gavin, told Santa Maria court, California, they were both threatened to keep quiet.
Jackson told them "not to tell anybody what happened, not even if they put a gun to your head", he said.
On Monday, the boy described the molestation allegations against the singer for the first time, saying he saw Jackson touching his brother as the boy slept on the singer's bed.
He said that he twice saw Jackson masturbating with one hand while the other was in his brother's underwear. He did not state the dates of the incidents, which the prosecution says followed a February 2003 TV documentary in which Jackson appeared with the boy at his Neverland ranch.
"I didn't know what to do," the witness said, adding that he watched both incidents for a few seconds before going to a guest room.
Speaking calmly, directly and unemotionally, the boy said the alleged molestations occurred two days apart.
The boy said the molestations occurred sometime after Jackson had shown him and his brother sexually explicit magazines kept in a suitcase in his bedroom.
"We all looked at them one at a time," he said.
The defence has said Jackson had "girlie" magazines in his house but never showed them to children.
District Attorney Thomas Sneddon projected on a courtroom screen the covers of magazines, including one called Barely Legal that depicted a young woman with her breasts exposed.
Jackson, 46, is accused of molesting a 13-year-old boy cancer survivor at Neverland, giving him alcohol and conspiring to hold the family captive to get them to rebut the damaging documentary in which Jackson said he allowed children to sleep in his bedroom.
The boy also described an incident in which Jackson grabbed a mannequin that he kept in his bedroom and "he pretended like he was having intercourse with it" on a bed while fully clothed and laughing. Jurors were shown a photo of a mannequin of a girl with braids.
The brother said Jackson had once asked him if he ever masturbated. The boy said he answered no.
"Then he said to me, 'Everyone does it. You should try it. It's OK,'" the witness said of Jackson.
He also told of Jackson conducting drinking parties with his young boy guests in which he served them wine and called it "Jesus juice".
The witness said that on the night he discovered Jackson with his brother, he pushed open the door to Jackson's room and, "I saw my brother was outside the covers. I saw Michael's left hand in my brother's underwears and I saw his right hand in his underwears".
He described his brother as curled up and snoring slightly, and he said he saw Jackson masturbating.
"He had his eyes closed," the witness said.
Two days later, he said, he encountered a similar scene.
The witness said he didn't tell his mother, sister or brother what he had seen.
"Who was the first person you told what you saw?" Sneddon asked.
"Dr Katz," he said, of psychologist Stan Katz, who interviewed the family and then reported to authorities that the boy might have been molested.
The family went to Katz after contacting attorney Larry Feldman, who had sued Jackson over 1993 molestation allegations. No charges were filed after Jackson settled the case for millions of dollars.
The defence says the current allegations are a fiction created by the children's mother in an attempt to get money from the pop star.
The courtroom was still during the testimony. Sometimes the boy spoke softly and had to be told to speak up, but he did not hesitate to answer questions.
Jackson's mother, Katherine, and father, Joe, were present but showed no reaction. Jackson occasionally leaned over, put his hand on his lawyer's shoulder and whispered in his ear.
Jurors listened intently and a few took notes.
"I'm sorry, I'm under a gag order," Jackson said as he left court and a reporter asked how he felt hearing the testimony.
The witness also testified that Jackson showed him and his brother internet sex sites, slept in bed with them and appeared before them naked and sexually aroused at Neverland.
The rosy-cheeked boy appeared to grow fatigued by the end of the day, yawning widely and rubbing his eyes with his hands.