He said the new law makes good on a promise he made in his inaugural address to end private prisons, saying they contribute to over-incarceration in the state.
"These for-profit prisons do not reflect our values," Newsom said in a statement Friday.
The California Department of Corrections and Rehabilitation withdrew its use of two private prisons this year, the Central Valley Modified Community Correctional Facility and another in Arizona.
The new law comes four months after the U.S. Department of Homeland Security said it observed "egregious" violations at the Adelanto Detention Facility, a private immigration detention center. Federal officials said they observed overly restrictive segregation, inadequate medical care, unreported security risks and food safety issues.
California plans to phase out its use of the Adelanto facility under the new law.
Assemblymember Rob Bonta, a Democrat who authored the bill, praised Newsom for signing it.
"This is truly a historic moment for California. By ending the use of for-profit, private prisons and detention facilities, we are sending a powerful message that we vehemently oppose the practice of profiteering off the backs of Californians in custody, that we will stand up for the health, safety and welfare of our people, and that we are committed to humane treatment for all," he said.