"This is about a pattern of poor behavior," 49ers general manager Trent Baalke said Wednesday. "We expect a lot from our players, hold them accountable for their actions."
Earlier in the day, local law authorities said they were investigating McDonald on suspicion of sexual assault.
San Jose Police Department Sgt. Heather Randol said an area hospital notified police late Tuesday night that a woman was seeking treatment and that detectives had searched McDonald's San Jose home.
"The victim alleged she was possibly sexually assaulted a day prior," Randol said. "Based on preliminary investigation, detectives secured a search warrant and served it at the alleged suspect's residence in San Jose."
No arrests have been made, nor have charges been filed.
Baalke said that CEO Jed York and coach Jim Harbaugh were involved in the decision to release McDonald. The 49ers notified the NFL office of the allegations against the defensive lineman, Baalke said, adding, "This is a team decision."
"It's not a situation you want to hear about. Very unfortunate," quarterback Colin Kaepernick said. "He's a good friend to a lot of people on this team. No one thought bad of him. Hopefully it's just a misunderstanding. ... I understand why the team did what it did. Other than that, it's not my business."
The NFL confirmed that the alleged incident is covered by its new conduct policy. The league will conduct its own investigation but will not interfere with law enforcement.
An NFLPA source told ESPN's "Outside the Lines" that no determination has been made on whether McDonald will file a grievance over his release.
This marks the second time in recent months that McDonald has been the subject of a police investigation.
Last month, the Santa Clara County district attorney's office announced that it declined to file charges against McDonald in a domestic violence investigation stemming from his Aug. 31 arrest.
Prosecutors cited conflicting versions of what happened, a lack of verifiable eyewitnesses and a lack of cooperation by the alleged victim, McDonald's fiancée.
McDonald had played all season despite pressure on the 49ers to bench him.
"If this was one incident, we would be standing up here talking about due process, like we have multiple times, in multiple other situations," Baalke said. "But this is just a pattern of decision-making that Ray has demonstrated over a period of time that, once again, it's no longer going to be tolerated."
Baalke said he had numerous conversations with McDonald in the wake of the August arrest and had set forth criteria for McDonald to "stay in good standing" with the club.
In light of the second issue this week, Baalke said, "We weren't willing to deal with [it] anymore."
ESPN's Chris Mortensen, Paul Gutierrez and The Associated Press contributed to this report.