It is situated on the banks of the river Lokhvytsia. The origin of the name comes from the name of the river. It is known since the days of Kyiv Rus' when the settlement applied to a defense line on the rive Sula.
In 1644 it received the Magdeburg Right and an emblem with a picture of a mural gate with towers over it.