The was established in 1887 and served as a major railroad company during the Meiji period in Japan. The railroad was headquartered in Kobe, and Nakamigawa Hikojirà  served as head of the railroad.
The first rail line opened in 1888. By 1894, the Sanyà  Railway had been extended west, along the coast of the Seto Inland Sea, from Kobe to Hiroshima. The railroad was later extended to Shimonoseki. The Sanyà  Main Line connected with the Tà Âkaidà  Main Line in Kobe, and the Kyà «shà « Railway at Moji. The railway gained a reputation for being one of the most progressive and innovative in Japan in its day, introducing the first sleeping cars, dining cars, and electric lighting on its trains. In 1904, the 530 km (330 mile) trip from Kobe to Shimonoseki took 11 hours. An express train from Kobe to Hiroshima took 8 hours, travelling 304 km (189 miles).
Sanyà  also operated steamship service, from Shimonoseki to Busan in Korea. Sanyà  Railway also operated a ferry from Miyajimaguchi Station, which opened on September 25, 1897, to Itsukushima (Miyajima).
The railroad was nationalized in 1906, under the Railway Nationalization Act, becoming the San'yà  Main Line.