MohBad, whose real name was Ilerioluwa Oladimeji Aloba and who wrote hits such as "Feel Good", died in hospital on September 12, aged 27, in circumstances that have never been fully explained.
Social media has been inundated with speculation about the cause.
Afrobeat stars Naira Marley, whose real name is Azeez Fashola, and Balogun Samson, known as Sam Larry, were summoned by police in October as part of the investigation into MohBad's death.
The pair were subsequently remanded in custody but police said they were freed on Friday.
"They were released yesterday around 5:00 pm (1600 GMT) after fulfilling all the conditions for parole set out by the court," Lagos state police spokesman Benjamin Hundeyin told AFP by telephone.
Media reports said a bail bond of 20 million nairas (22,000 euros) was fixed by a court.
The court also ruled that they had to hand over their passports and appear weekly at the State Criminal Investigation Department, reports added.
Five people in all have been arrested over the death.
In early October, police arrested an unregistered nurse, accusing her of injecting the rap star with medications in a "professionally negligent" way.
Feyisayo Ogedengbe had been invited by one of MohBad's friends to treat him at his home, Lagos police commissioner Idowu Owohunwa said on announcing the arrest.
MohBad was given three injections including antibiotics that later caused vomiting and convulsions, police said.
MohBad's career took off in 2019, after being signed by Marley's record label Marlian Music. Mohbad left the label in 2022 following disagreements with the owner.
Following the social media speculation, Marley said on X, the former Twitter, that he had returned to Lagos to "assist the authorities with the ongoing investigation" and "with hopes for the truth to be uncovered and for justice to prevail."