Jajce was first built in the 14th century and served as the capital of the independent Kingdom of Bosnia during its time. The town has gates as fortifications, as well as a castle with walls which lead to the various gates around the town. About 10–20 kilometres from Jajce lies the Komotin Castle and town area which is older but smaller than Jajce. It is believed the town of Jajce was previously Komotin but was moved after the Black Death.
The first references to the name of Jajce in written sources is from the year 1396, but the fortress had already existed by then. Jajce was the residence of the last Bosnian king Stjepan Tomasevic; the Ottomans besieged the town and executed him, but held it only for six months, before the Hungarian King Matthias Corvinus seized it at the Siege of Jajce and established the Banovina of Jajce.
Skenderbeg Mihajlović besieged Jajce in 1501 without success and was defeated by Ivaniš Korvin assisted by Zrinski, Frankopan, Karlović and Cubor.
During this period, Queen Catherine restored the Saint Mary's Church in Jajce, today the oldest church in town. Eventually, in 1527, Jajce became the last Bosnian town to fall to Ottoman rule. The town then lost its strategic importance, as the border moved further North. There are several churches and mosques built in different times during different rules, making Jajce a rather diverse town in this aspect.
Jajce passed with the rest of Bosnia and Herzegovina under the administration of Austria-Hungary in 1878. The Franciscan monastery of Saint Luke was completed in 1885.
From 1929-41, Jajce was part of the Vrbas Banovina of the Kingdom of Yugoslavia.
During the Second World War, Jajce gained importance as centre of a large swath of free territory, and on 29 November 1943 it hosted the second convention of the Anti-Fascist Council of National Liberation of Yugoslavia . There, representatives from throughout Yugoslavia decided to establish a federal Yugoslavia in equality of its nations, and established that Bosnia and Herzegovina would be one of its constitutive Republics. Post-war economy of Jajce in socialist times was based on industry and tourism.
At the beginning of the Bosnian War, Jajce was inhabited by people from all ethnic groups, and was situated at a junction between areas of Serb majority to the north, Bosnian Muslim majority areas to the south-east and Croatian majority areas to the south-west.