Józefów was located in 1725 on the grounds of Majdan Niepryski village. Józefów became a commercial, service and administrative centre for this part of Ordynacja Zamojska dictrict.

In 1772 Józefów became a part of Austrian Annexation, in 1809 it went under the rule of the Duchy of Warsaw to be incorporated into Congress Poland after 1815.

In 1863 during January Uprising Polish insurgents opposed Tsar's troops near the city. After the defeat of the Uprising, in 1870 Russian authorities unvested Józefów of its city rights.

The area around Józefów was a theatre of intensive activity of Polish guerilla troops during the Second World War. In June 1943 the National Army managed to seize the city for a day as a result of a daring military operation. The area was nicknamed the Republic of Józefów. Nazis organised mass exterminations of Polish civilians in reprisal for guerilla actions.

In June 1944 Germans fought a harsh battle with AK guerilla troops, which tried to escape being encircled. Józefów was liberated from Nazi occupation on the 24 of July 1944.

In 1988 Józefów was granted city rights once again.