Central Pacific and Southern Pacific railroads
In 1856, Stanford and his wife moved to Sacramento, where he engaged in mercantile pursuits on a large scale. Stanford was one of the four merchants known popularly as "The Big Four" (or among themselves as "the Associates"), who were the key investors in Chief Engineer Theodore Dehone Judah's plan for the Central Pacific Railroad. The five of them incorporated it on June 28, 1861, and Stanford was elected as its president. The other three associates were Charles Crocker, Mark Hopkins, and Collis P. Huntington.
The Central Pacific's first locomotive, named Gov. Stanford in his honor, is preserved on static display at the California State Railroad Museum, in Sacramento.
Stanford ran unsuccessfully for governor of California in 1859. He was nominated again in 1861 and won the election. Due to the Great Flood of 1862, Stanford had to row to his inauguration in a rowboat. He served one term, then limited to two years.
While the Central Pacific was under construction, Stanford and his associates in 1868 acquired control of the Southern Pacific Railroad. Stanford was elected president of the Southern Pacific, a post he held until 1890 (except for a brief period in 1869–1870 when Tevis was acting president) when Stanford was ousted by Collis Huntington.
As head of the railroad company that built the western portion of the "First Transcontinental Railroad" from Sacramento eastward over the Sierra Nevada mountains in California to Nevada and Utah, Stanford presided at the ceremonial driving of "Last Spike" in Promontory, Utah, on May 10, 1869. The grade of the CPRR met that of the Union Pacific Railroad, which had been built westward from its eastern terminus at Council Bluffs, Iowa/Omaha, Nebraska. He was even given the honor of driving the final spike.
Stanford moved with his family from Sacramento to San Francisco in 1874, where he assumed presidency of the Occidental and Oriental Steamship Company, the steamship line to Japan and China associated with the Central Pacific.
The Southern Pacific Company was organized in 1884 as a holding company for the Central Pacific-Southern Pacific system. Stanford was president of the Southern Pacific Company from 1885 until 1890 when he was forced out of that post (as well as the presidency of the Southern Pacific Railroad) by Collis Huntington, the company's ranking vice president and the corporate directorate. That was thought to be retaliation for Stanford's election to the US Senate in 1885 over Huntington's friend, Aaron A. Sargent.
Stanford was elected chairman of the Southern Pacific Railroad's executive committee in 1890, and he held this post and the presidency of the Central Pacific Railroad until his death.