Although Knight reportedly counted Carter as a friend, prosecutors contended the collision was deliberate.
According to prosecutors, Knight proceeded to follow the men to a nearby burger restaurant, where he ran over them with his auto.
Knight, who at the time was out on bail in a robbery case, fled the scene but was later arrested.
TMZ broke the news just days before his trial was scheduled to begin.
Knight was initially charged with murder and faced life in prison without parole - his sentence of 28 years stems from a plea deal struck with the District Attorney's office on Wednesday.
In pleading no contest, equivalent to a guilty plea under California law, the 53-year-old co-founder of influential hip-hop label Death Row Records admitted using a "deadly and risky weapon" when he ran down two men with his pickup truck. Sloan has denied he and Carter were carrying arms.
Last year, Knight was indicted on charges of "threatening death or bodily injury" against Staight Outta Compton director F. Gary Gray. Attorneys for Knight have said that he was acting in self-defense and that Sloan was armed, which Sloan has denied.
By entering his plea, Knight also will resolve two other pending criminal cases. With this plea, Knight will not be eligible for release until he is 81 years old.
The agreement means prosecutors will recommend he serve 28 years behind bars.
Death Row Records launched stars such as Snoop Dogg and Tupac Shakur but collapsed in 1996 when Knight was jailed for violating a probation order by beating up a rival in Las Vegas.