|History of California|
Slavery in colonial California began with the systematic enslavement of indigenous Californians. The arrival of the Spanish colonists introduced chattel slavery and involuntary servitude to the area. White colonists from the Southern and Eastern United States brought their systems of organized slavery to California.
Many free and enslaved people of African ancestry were part of the California Gold Rush (1848–55), and many were able to buy their freedom and freedom for their families, primarily in the South, with the gold they found. 
There were a relatively small number of Gold Rushers of African ancestry, probably fewer than 4,000. One of the miners was an African American slave named Edmond Edward Wysinger (1816–1891). After arriving in the Northern mine area of the California Mother Lode with his owner in 1849, Wysinger and a group of 100 or more African American miners were surface mining in and around Mormon, Mokelumne Hill at Placerville, and Grass Valley. It took him about a year to buy his freedom for $1,000.
Further information: Unfree labor in California
The Spanish first began to settle in The Californias in 1769, founding the first Spanish mission, Misión San Diego de Alcalá. They also established four military installations throughout California, including el Presidio Real de San Carlos de Monterey, el Presidio Real de San Diego, el Presidio Real de San Francisco, and el Presidio Real de Santa Bárbara.
The padres would often baptize Native Californian villages en masse and relocate them to the missions, where they would work either voluntarily or by force from location to location. To the padres, the Native Californians were newly baptized members of the Catholic Church and were treated with varying amounts of respect, depending on the priest in question. Many of the soldiers, however, saw them solely as manpower to be exploited. The soldiers would force the Native Californians to perform most of the manual labor needed in their fortresses, and often raped the women of their villages. There was multiple recorded uprising by the Native Californians, both violent and nonviolent.
Mexico gained its independence from Spain and from 1821–1846, California (called Alta California by 1824) was under Mexican rule. The Mexican National Congress passed the Colonization Act of 1824 in which large sections of unoccupied land were granted to individuals and in 1833 the government secularized missions and consequently many civil authorities at the time confiscated the land from the missions for themselves. These two acts aided in the creation of a ranchos system that required a large labor force to maintain. Essentially the entire economy shifted from work on the missions to work on large land estates of wealthy Mexicans. A system was devised where it was virtually cost free to utilize indigenous labor; workers were exchanged between ranchos and essentially became indentured servants.
Most of the future western United States, roughly south of 42 degrees North latitude and from California eastward to Texas, the Oklahoma Panhandle and southwestern Kansas, was part of the Viceroyalty of New Spain and, thus, became part of Mexico upon independence from Spain in 1821.
President Vicente Guerrero, who was of Spanish, African and Native American descent, abolished slavery within Mexico in 1829. This law was intended by its proponents as a counter-measure against settlement by Americans, who used slave labor in their Texas cotton plantations. This did not stop Americans from moving into the Mexican province of "Tejas." Instead, by 1832, American settlement in Texas reached sufficient critical mass to declare and win independence from Mexico as the Republic of Texas. The annexation of Texas by the United States in 1845 precipitated the Mexican–American War, which resulted in California becoming American territory.
With the 1848 defeat of Mexico, California and other Mexican territories were ceded to United States rule (the Mexican Cession) under the terms of the Treaty of Guadalupe Hidalgo, which ended the war.
Between 1846 to 1855, the Native population decreased by two-thirds and in order to craft California's own code of labor, the Act for the Government and Protection of Indians was passed in 1850 which "legally" curtailed the rights of the Indigenous. Within this Act, Native children could be obtained for indenture, convicted Native American could be hired out of jail and Indians could not testify for or against whites. This legalized a form of slavery, of forced labor in California. 24,000 to 27,000 Californian Natives were taken as forced laborers by settlers including 4,000 to 7,000 children; Between 1851 and 1852, three Indigenous commissioners negotiated treaties with the Natives and eventually eighteen were written, allocating 7.5% of the state as Native American reservations. The United States Senate rejected these treaties and about a year later in 1853, the government designed its own five reservations. These reservations had very poor living conditions and displaced many of the Native Californians from their native lands.
During this time, the 30-state nation was divided equally between 15 free states and 15 slave states. With the addition of vast new, agriculturally-rich territories, including California, the debate over slavery intensified dramatically. California itself was divided over the issue, as a large number of slave-owning Southerners had travelled to California to seek their fortunes in the 1849 Gold Rush, and many brought their slaves. Many miners expressed concern that slaveholders accompanied by slaves had an unfair advantage in the mining camps and that slavery's inherent inequality violated "the independent entrepreneurial sprit of the mines." However, taking slaves into California, which had no laws or enforcement mechanisms for maintaining the institution, turned out to be quite risky for the slave owners themselves. The territory had no slave patrols, nor local police interested in maintaining slavery, so slave escapes were quite common.
In October 1849, the first California Constitution Convention was held. One of the most heated debates of the Convention was on the status of slavery in the new state. While some Southerners who had come to California were staunchly in favor of giving official sanction to slavery in California, Northern abolitionists and White-American miners (who did not want competition from the slave-holders in the gold fields) were well represented within the ranks of the convention. The chairman of the convention, William Gwin, was himself a slaveholder from Tennessee. Gwin, however, was much more interested in gaining control of the California Democratic Party than he was in favoring either side of the debate. To the later chagrin of his fellow Southern members of Congress, he did not write the institution of slavery into the 1849 Constitution. The Compromise of 1850 later permitted California to be admitted to the Union as a free state. Gwin and war hero/abolitionist John C. Frémont became California's first Senators.
Although California entered the Union as a free state, the framers of the state constitution wrote into law the systematic denial of suffrage and other civil rights to non-white citizens. Some authorities went so far as to attempt to deny entry of all African-Americans, free and slave, to California. The Legislature passed a bill that would ban the immigration of free blacks to California. State Senator David C. Broderick, a fierce opponent of slavery and former firefighter from San Francisco, managed to kill the bill through parliamentary maneuver.
Slavery did persist in California even without legal authority. Some slaveowners simply refused to notify their slaves of the prohibition, and continued to trade slaves within the state. Numerous state trials ruled in the favor of emancipation.
A backlash against these legal wins for the free Black community in California whipped up in the State government; the Chinese Exclusion Act was also being debated at that time. Fearful of the hostile maneuvers against them, over 700 African-Americans left California in a mass exodus via steam ship for the women and children and mass cavalcade for the men to Victoria, Canada, and the Fraser Canyon Gold Rush.
During the American Civil War, clergyman and politician Thomas Starr King was a fervent speaker, he spoke in favor of the Union and was credited by Abraham Lincoln with preventing California from becoming a separate republic. At the urging of activist and writer Jessie Benton Frémont, Starr King teamed up with writer Bret Harte. Starr King read Harte's patriotic poems at pro-Union speeches. Starr King also raised $1 million in fundraising for Union soldiers, California’s largest charity effort during this war.
Slavery was, for the most part, abolished in all states under the Thirteenth Amendment to the United States Constitution, which took effect on 18 December 1865.
none of the said persons of color can read and write, and are almost entirely ignorant of the laws of the state of California as well as those of the State of Texas, and of their rights