The origins of the town go back to the early Middle Ages, when a Ruthenian defensive gord existed on the Huczwa river island.
After the first partition of Poland in the late 18th century Hrubieszów was annexed by the Habsburg Empire.