Russia

Russia has the longest railway line in the world.

An excerpt from the article 26 facts about Russia
The Trans-Siberian Railway is 9,200 kilometers long. It connects Western Russia with the Russian Far East, starting in Moscow and ending in Vladivostok.