 Loknya was founded in 1900 as a settlement serving the railway station on the railway between Moscow and Riga.Eventually, it became the administrative center of Loknyanskaya Volost of Velikoluksky Uyezd.The name of the station originates from the nearby Loknya River.