Jerry Brown, the state's environment-friendly governor, said he hoped the measure -- which goes into effect next year and is the first of its kind nationwide -- would spur people to "pause and think" about an alternative before requesting a straw.
"It is a very small step to make a customer who wants a plastic straw ask for it," Brown said in a statement.
"But one thing is clear -- we must find ways to reduce and eventually eliminate single-use plastic products," added the governor, a fierce environmentalist who has been a leading U.S. voice in the battle to fight climate change.
Under the new law, restaurants that don't comply will get two warnings before being fined a maximum of $300 a year.
Brown warned that plastics in all forms were "choking our planet" and pointed to the huge amount of plastic products dumped into the oceans every year, killing off marine life.
"Plastic has helped advance innovation in our society, but our infatuation with single-use convenience has led to disastrous consequences," he said.
The new law comes amid increased awareness worldwide about the global plastic waste crisis.
The European Union in May proposed a bloc-wide ban on single-use plastics such as straws, cutlery and cotton buds while urging the collection of most plastic drink bottles by 2025.
France plans to introduce a penalty system next year that would increase the costs of consumer goods made of plastic, including plates, cups and utensils.