The attorney earlier indicated such a bail was probably higher than his client could post.
Knight bent over in his chair at the defense table, with his attorney beside him, and two deputies rushed to him as he was facedown.
Moments earlier, the judge ruled that Knight "has a great potential to flee and apparently has so in the past."
"In this court's opinion, $25 million is reasonable, and it is so set," said Los Angeles Superior Court Judge Ronald S. Coen.
Attorney Matthew Fletcher told CNN affiliate KABC that Knight hit his head on a chair and knocked himself out.
Fletcher later saw Knight in the holding cell, and "he was dripping sweat ... like somebody threw a bucket of water on him," Fletcher told the station.
"And he wiped the sweat off his head and said, 'I haven't had my medication,' and I said since when, and he said since yesterday. That's when I went back in and told the judge 'You need to make an order that he gets his medicine and he hasn't been fed' and the judge said, 'Well, they offered him food at some point today,' and I said well that's not what I've heard," Fletcher told the affiliate.
Knight, who suffers from diabetes and blood clots, was taken to the hospital, the attorney said. Knight's condition was not immediately available. He has collapsed before while in custody.
Knight has been held in solitary confinement, Fletcher added.
When asked about the $25 million bail, Fletcher said, "It's just laughable."
The bail in other prominent murder cases "at most is $5 million," Fletcher told the affiliate.
"The heads of the Mafia, $5 million (bail)," Fletcher said.
Prosecutors sought the $25 million bail, he added.
A preliminary hearing was scheduled for April 13.
Knight, 49, has pleaded not guilty to several charges that accuse him of running over two men -- killing one of them -- in January after an argument.
Knight is charged with one count of murder, one count of attempted murder and two counts of hit-and-run, with an allegation that he committed a serious and violent felony while out on bail, prosecutors said.
The man who died was Terry Carter, 55, a former rap record label owner. The second man is Cle "Bone" Sloan, 51.
The deadly incident happened on January 29, after a flare-up on the set of the biopic "Straight Outta Compton," a film about the highly influential and controversial rap group N.W.A. The argument spilled over to the parking lot of Tam's Burgers in Compton.
The incident is the latest run-in with the law for Knight, who founded the wildly successful Death Row Records in 1991 and signed artists such as Snoop Dogg and Tupac Shakur.
Knight was driving the car in which Shakur was a passenger when the rapper was shot to death in Las Vegas in 1996.
Shortly afterward, Knight spent several years in prison for violating parole on assault and weapons convictions. That prison time -- along with Shakur's death, feuds between Knight and a number of rappers, and desertions by Dr. Dre, Snoop and others -- contributed to the label's bankruptcy in 2006.
In August, Knight and two other people were shot while inside a celebrity-filled Sunset Strip party hosted by singer Chris Brown
on the eve of the MTV Video Music Awards.
At the time of his most recent arrest, Knight was free on bail in a robbery case.