The Tibetan spiritual leader said California's diversity provides "positive potential to create genuine harmony of the different races, different beliefs."
"First create peace in your own family. Then from one family to 10 families. Then from 10 families to 100 families. Compassion, that's the way to change. So think please think each individual, yes you have the potential to make some contribution to a better world, happy humanity," he said in his first visit to the state capital.
He spoke about expanding education and protecting the environment.
The Dalai Lama is in the midst of a U.S. tour that included a White House visit last week with President Barack Obama. On Saturday he delivered a sermon at a new Vietnamese temple in Southern California.
In Sacramento, he ate lunch with Gov. Jerry Brown and his wife, Anne Gust Brown; Assembly Speaker Anthony Rendon, D-Paramount; Senate President Pro Tem Kevin de Leon, D-Los Angeles, and others, said Evan Westrup, a spokesman for Brown.
In his speech, the Dalai Lama echoed the message of peace and compassion that he's delivered all over the world.
Education, he said, can create a more compassionate society.
He expressed hope that the latter part of the 21st Century will be less violent. Just over a week after the shooting death of 49 people at an Orlando nightclub, the Dalai Lama pointed to his heart and said "real gun control must start here."
Rendon, the Assembly speaker, praised the Dalai Lama's remarks.
"His Holiness the Dalai Lama delivered an important message that is particularly resonant given our times - education leads to greater compassion, greater compassion leads to inner peace, and inner peace can prevent the problems of our world," Rendon said.
State Assemblyman Jim Cooper (D) of Elk Grove says says the Dalai Lama's speech will have help in the decision making in Sacramento.
"I think so. It's important to do what's best for California but it was timely not just here but for national politics," he said.
"The legislature is a polarized place as is the world he has a great message of peace and harmony we can all benefit from," said State Senator Steve Glazer (D) form Walnut Creek.
The Associated Press contributed to this report.