Kansas's first railroad was the Leavenworth, Pawnee & Western Railroad (LP&W), chartered in 1855. At the time the region was virtually devoid of settlement and as a result no funding could be secured for its construction.
When President Lincoln signed the Pacific Railway Act on July 1st, 1862, and Union Pacific was formed to build the eastern component of the Transcontinental Railroad, LP&W was wrapped up into a new entity known as the Union Pacific Railway, Eastern Division in July, 1863.
It began construction from Kansas City that September and had opened 40 miles to Leavenworth by 1864. In 1869 it was renamed as the Kansas Pacific Railway and completed into Denver, Colorado the following year. It went on to become an important artery under the modern Union Pacific.