As a teenager, young Mariano, his nephew Juan Bautista Alvarado (1809-1882), and José Castro (1808-1860) received special instruction from Governor Pablo Vicente de Solá. The boys received government documents and newspapers from Mexico City, as well as access to the governor's personal library. Vallejo then worked as a clerk for English merchant William Hartnell, who taught Vallejo English, French, and Latin.
Vallejo was serving as the personal secretary to the new Governor of California, Luis Argüello, when news of Mexico's independence reached Monterey. Argüello enrolled Vallejo as a cadet in the Presidio company in 1824. After being promoted to corporal, Argüello appointed Vallejo to the diputación, the territorial legislature. He was promoted to alférez (equal to a modern army second lieutenant), and in 1829, Vallejo led a group of soldiers against the Miwoks, under chief Estanislao. After a three-day battle, Vallejo's troops forced the Miwok to flee to Mission San José, seeking refuge with the padres.
Vallejo began construction of a presidio in Sonoma to counter the Russian presence at Fort Ross. Vallejo transferred most of the soldiers from San Francisco to Sonoma, and began construction of his two-story Casa Grande adobe on the town plaza. He formed an alliance with Sem-Yeto, also known as Chief Solano of the Suisunes tribe, providing Vallejo with over a thousand Suisunes allies during his conflicts with other tribes.
Governor Figueroa died in September 1835, and was replaced by Nicolás Gutiérrez, who was unpopular with the Californio population, resulting in an uprising headed by Juan Alvarado the next year. Alvarado tried to persuade Vallejo to join the uprising, but he declined to become involved. One hundred-seventy Californios led by José Castro and fifty Americans led by Isaac Graham marched on Monterey. After the rebels fired a single cannon shot into the Presidio, Governor Gutiérrez surrendered on November 5, 1836. On November 7, Alvarado wrote to his uncle Mariano, informing Vallejo he had claimed to be acting under Vallejo's orders and asking him to come to Monterey to take part in the government. Vallejo came to Monterey as a hero, and on November 29, the diputación promoted Vallejo from alférez to colonel and named him Comandante General of the "Free State of Alta California", while Alvarado was named Governor. The Federal Government in Mexico City would later endorse Vallejo and Alvarado's actions and confirm their new positions.
Also in 1841, the Russians at Fort Ross offered to sell the post to Vallejo. After several months of negotiations and delays by the Mexican authorities and Governor Alvarado (who feared his uncle was plotting to overthrow him), John Sutter purchased the fort. This economic and military setback confirmed Vallejo's belief that it would be better if California was no longer ruled from Mexico City. Although both France and the United Kingdom expressed interest in acquiring Alta California, Vallejo believed the best hope for economic and cultural development lay with the United States.
In November 1841, Vallejo was meeting with José Castro at Mission San José when he was informed of the arrival in California of an immigrant party led by John Bidwell and John Bartleson. Half of the group was staying with Dr. John Marsh north of Mount Diablo, while the rest had continued on to San José. They were arrested before reaching the pueblo for illegally entering Mexico and brought to Vallejo at the mission. Vallejo's orders from Mexico City were clear. Americans entering Mexico without valid passports were to be sent back to the United States. However, after the Graham affair, Vallejo was reluctant to deport another group of Americans, especially those with skills useful for colonizing the northern frontier. These reasons, coupled with his disillusionment with the Mexican government, led Vallejo to grant passports to the immigrants detained in the mission and to give Dr. Marsh passports for those camped on his rancho.
In 1842, the Federal Government replaced Vallejo and his nephew Alvarado with Manuel Micheltorena as both civil and military Governor of Alta California. Micheltorena arrived with the batallón fijo, a force of 300 pardoned criminals, who out of desperation at not being paid began to loot the population.
Vallejo, his French secretary Victor Prudon, his brother Don Salvador Vallejo, and their brother-in-law Jacob Leese were taken as prisoners to John C. Frémont's camp in the Central Valley. Frémont ordered they be kept prisoners in Sutter's Fort. Conditions for the prisoners were good, until Frémont discovered they were well fed and allowed to walk around the fort several times a day. He replaced the jailer, instructing the replacement to treat them "no better than any other prisoner". Mariano contracted malaria while being held at the fort. After agreeing to remain neutral during the remainder of the war with Mexico, Mariano was released on August 1 and arrived at Casa Grande a day or two later, weighing only 96 pounds. His brother and brother-in-law were released about a week later. By the time of his release, Mariano was still uncertain about his stance in the war. Because of his belief that California would thrive better with the United States, and that at this time, the Americans were in complete control of the northern area of California, he evertually sided with them. At his home, he showed his allegiance by burning his Mexican uniform in a dignified manner.
Although the Treaty of Guadalupe Hidalgo formally protected the legal rights of Mexicans now part in the United States, a long legal challenge to Vallejo's land title cost him thousands of dollars in legal fees and finally deprived him of almost all his land and farm animals. Most Californios could not afford the legal expenses to claim their lands, which was thus lost to wealthy Americans and the flood of immigrants, beginning with the Gold Rush, which left the Californios outnumbered and unable to protect their political power. At some time prior to 1869, Vallejo gave the Mexican land grant called Rancho Yajome to his daughter as a wedding present, when she married General John H. Frisbie(Earth Metrics, 1989). This land grant in the Milliken Creek watershed was at that time wilderness and included the property now known as the Silverado Country Club, located in Vichy Springs in the Napa Valley.
By the time of his death in 1890, Vallejo led a modest lifestyle on the last vestige of his once vast landholdings, he continued to devote his energies to the development of California for the remainder of his life. General Mariano Vallejo died at Sonoma, California. He and his wife are interred at the Mountain Cemetery in Sonoma.
Vallejo's Rancho Petaluma Adobe is now preserved in the Petaluma Adobe State Historic Park as a National Historic Landmark. The U.S. Navy submarine USS Mariano G. Vallejo was named in his honor.