Images posted by Caltrans on Twitter showed the truck on its side and the boxes of cookie dough on the I-15 Freeway.
All 50,000 pounds of the cookie dough was possibly spoiled after the crash.
No injuries were reported and the people in the truck were able to climb out of the vehicle safely.
The cause of the crash is under investigation.
MORE: 10-pound bag of marijuana spills onto CA roadway