In 1991 the population of Žepa was 2,441 with 2,330 Bosniaks (95%), 103 Serbs and 8 Yugoslavs.
During the War in Bosnia (1992-1995), Žepa became one of three Bosniak enclaves in eastern Bosnia surrounded by the Serbs, along with Srebrenica a short distance downstream and Goražde farther upstream, after other towns such as Foča, Bratunac and Zvornik were ethnically cleansed. The military commander of the Žepa enclave was Avdo Palić. In April 1993 Žepa was declared a United Nations safe area and had a small Ukrainian Army unit of UNPROFOR stationed there. In July 1995, the town was captured by the Army of Republika Srpska who expelled the population.