The San Francisco and San Jose Railroad built the first segment of the line from San Francisco to San Jose between 1860 and 1864. The founders of the SF&SJ incorporated as the Southern Pacific Railroad, which was authorized by Congress in 1866 to connect the line from San Jose south to Needles, where it would meet the Atlantic & Pacific Railroad. SP had built to Tres Pinos by 1873, however they abandoned efforts to continue the line to Coalinga, instead choosing a route from Lathrop. 
By 1871, SP had completed a line south from San Jose through Gilroy and Pajaro, arriving at Salinas in 1872 and Soledad in 1873. SP halted southward work at Soledad for thirteen years and started building north from Los Angeles in 1873, completing a line to Burbank. In 1886, SP had pushed south from Soledad to King City, Paso Robles, and Templeton; by 1887, the southern portion of the line had been extended through Newhall, Saugus, and Santa Paula to Santa Barbara.
By 1894, SP had extended the line south over the Cuesta Pass from Templeton to San Luis Obispo. The work continued south to Guadalupe in 1895 and Surf in 1896. The 80-mile (130 km) gap between Surf and Santa Barbara was closed with the last spike driven on December 28, 1900.
Work on the Montalvo Cutoff, which crossed the Santa Clara River to serve the farmers in the Oxnard Plain and was extended to Santa Susana in Simi Valley, began in 1898. The Santa Susana Tunnel opened in 1904 connecting with the Chatsworth cutoff from Burbank[b] and thereafter was the main line. Passenger and freight traffic declined dramatically at the Hueneme wharf in Ventura County as they shifted to the railroad. A new straighter track was built between Chatsworth and Burbank to coincide with the new route, and the original line through the San Fernando Valley was designated as the Burbank branch. In 1907, the Bayshore Cutoff opened from San Bruno[c] to San Francisco, relegating the original main line through the Bernal Cut to branch status. In 1935 the new line around downtown San Jose opened[d] and thereafter was the main line.
In the golden era of passenger service, SP trains on the San Francisco leg of this route ran from the Third and Townsend Depot in San Francisco to the Union Station in Los Angeles. The Oakland–Los Angeles trains originated from the 16th Street Station in Oakland.
The line has several subdivisions. Ownership is currently split into three segments:
- Caltrain (PCJPB) from CP Lick (MP 51.6, south of Tamien yard) north to San Francisco
- Union Pacific Railroad (UP), which merged with Southern Pacific (SP) in 1996, from CP Lick south to the north end of Moorpark[e]
- Between CP Lick (MP 51.6) and CP Coast (MP 43.9), the Coast Line is owned by PCJPB. At CP Coast, north of Santa Clara Transit Center, the UP Coast Subdivision resumes and branches from the Peninsula Corridor, traveling north/northeast to CP Newark (MP 31.0), where it joins with the Niles Subdivision.
- Metrolink south of Moorpark.
Santa Barbara Subdivision
The Peninsula Corridor Joint Powers Board purchased the line on the San Francisco Peninsula north of Tamien in 1991, and the line north of Santa Clara is primarily used by passenger services. In 1992, Southern Pacific granted the Los Angeles County Transportation Commission an option to purchase the entire Coast Line for passenger train operations at 110 mi/h (180 km/h). Upgrades to signals and tracks to enable higher-speed operations were estimated to cost $360 million at the time. In the case of both purchases, SP retained freight trackage rights along those lines which continue to be held by the company's successor, Union Pacific.
Union Pacific freight trains run on the route, although the Fresno Subdivision through the San Joaquin Valley is the preferred north–south California route due to having easier grades and curves. The freight trains are typically local freights, empty bare-table and autorack trains. The line sees varying freight activity across its length. As of 2003[update], the line between Niles and San Jose saw four freight trains per day, the segment between San Jose and Watsonville saw 13 freight trains per day, between Watsonville and San Louis Obispo saw 7, San Louis Obispo to Santa Barbara saw 9, and 16 south of Santa Barbara to Los Angeles.
The Coast Line is used by commuter, regional, and inter-city passenger trains:
- Amtrak California
- Amtrak Coast Starlight (Los Angeles–Seattle)
- Metrolink Ventura County Line (Ventura–Los Angeles)
- Caltrain (San Francisco–Gilroy)
- Altamont Corridor Express (San Jose–Stockton)
The southern part of the Coast Line is the northern portion of the 351-mile-long (565 km) LOSSAN Rail Corridor between San Luis Obispo and San Diego. Local agencies along with the host railroads formed the Los Angeles–San Diego-San Luis Obispo Rail Corridor Agency (LOSSAN) in 1989 to work together on upgrading the route. Millions in enhancements to improve the reliability and safety of the railroad corridor have been proposed by Caltrans and federal railroad officials. Ventura County would get rail curve realignments near Seacliff, the Santa Clara River and Montalvo in the near term for an estimated $300 million. Future rail service could include a Ventura–Santa Barbara commuter train. Long-range plans also including commuter service between Ventura and Santa Clarita along the original route through the Santa Clara River Valley. The Ventura County Transportation Commission purchased the Santa Paula Branch Line within Ventura County from Southern Pacific. While a portion of the line was abandoned after being washed out in Los Angeles County, the Newhall Ranch development will provide for a route through the community.
- Surf Line, the continuation south to San Diego
- Cal-P Line, the continuation north to Sacramento
- History of rail transportation in California
- Monterey County Rail Extension
- South Pacific Coast Railroad
- Burbank Cutoff
- San Bruno,
- Between to
- Moorpark, about
- Daggett, Stuart (1922). Chapters on the History of the Southern Pacific. New York: Ronald Press Company. p. 123–124.
- "Coast Line History" (PDF). The Ferroequinologist. June 1984. Retrieved May 23, 2018.
- Robertson 1986, p. 240
- Middlecamp, David (August 31, 2019). "From stagecoach robberies to railroads, SLO's new train tracks signaled end of an era". The Tribune. Retrieved August 31, 2019.
- "New Bonds Unite Los Angeles with the Northern Metropolis". Los Angeles Herald. December 29, 1900. Retrieved May 23, 2018.
- "Chronology of Goleta Depot". Institute For American Research. Archived from the original on November 6, 2013. Retrieved October 30, 2013 – via South Coast Railroad Museum.
- Ryan, MaryEllen; Breschini, Ph.D., Gary S. "Railroads of the Central Coast—An Overview". Monterey County Historical Society. Retrieved March 23, 2014.
- "Southern Pacific Company, 20th Annual Report" (December 10, 1904) The Economist
- "CHATSWORTH PARK CUTOFF LINE OPENS TODAY". Los Angeles Herald. Vol. XXXI, no. 173. March 20, 1904. p. 2.
- Chase, J. Smeaton (1913). "California Coast Trails: a Horseback Ride from Mexico to Oregon" Chapter VI. Reprinted in The Double Cone Register, the online journal of the Ventana Wilderness Alliance, Volume VIII, No. 1, Fall 2005
- Curtiss, Aaron (April 7, 1996). "Tracks to the Past". Los Angeles Times. Retrieved January 31, 2021.
- McGovern 2012, pp. 26, 125
- SMA Rail Consulting (April 2016). "California Passenger Rail Network Schematics" (PDF). California Department of Transportation. p. 6.
- Kaufman, Lawrence H (September 30, 1992). "LA transit agency gets option to buy SP's Coast Line route proposed for high-speed use". The Journal of Commerce. Retrieved June 13, 2018.
- Norbom, Mary Ann (August 30, 2016). "Ride historic railcars along the coast". Santa Ynez Valley News. Retrieved September 3, 2016.
- Union Pacific Tons per Train (PDF) (Map). Trains. 2003. Retrieved September 11, 2023.
- "LOSSAN Corridorwide Strategic Implementation Plan, Final Report (April 2012)" (PDF). San Luis Obispo Council of Governments. Archived from the original (PDF) on January 18, 2021. Retrieved April 24, 2018.
- Clerici, Kevin (January 9, 2011) "Camarillo meeting to address train projects" Ventura County Star
- Lozano, Carlos V. (April 29, 1992) "SANTA CLARITA : Panel Says Rail Line to Cost $45 Million" Los Angeles Times
- McGovern, Janet (2012). Caltrain and the Peninsula Commute Service. Arcadia Publishing. ISBN 9780738576220.
- Robertson, Donald B. (1986). Encyclopedia of Western Railroad History Volume IV California. Caxton Printers. ISBN 9780870043857.
- Signor, John R. (June 15, 1995). Southern Pacific's Coast Line. Signature Press. ISBN 0-9633791-3-5. Retrieved June 13, 2018.