California can legally secede from the United States if at least 50% of registered voters in California participated and at least 55% percent voted "yes" to secede, and then if two-thirds of both houses of Congress and 38 states ratify it. Then, the governor of California would have been required to write to the United Nations to request its membership as a nation.