San Jose police Sgt. Heather Randol says the 29-year-old defensive end was taken into custody early Sunday after officers responded to a home in an upscale neighborhood.
McDonald was jailed on felony domestic violence charges. Santa Clara County sheriff's Sgt. Kurt Stenderup says McDonald was released after posting bail.
NFL Commissioner Roger Goodell announced tougher penalties last week for players accused of domestic violence.
San Francisco 49ers General Manager Trent Baalke said in a statement Sunday that the team takes "such matters" seriously but isn't commenting on the allegations involving McDonald without more information.
McDonald has been playing for San Francisco since he was drafted as a third-round pick in 2007.