Archaeological research confirms that this area has been populated since prehistoric times. The Illyrians, Romans and Slavs alternated in the Lim Valley. Numerous burial mounds and fragments of monuments from the Roman period have been discovered, as well as the remnants of a mediaeval town-fortress on Grace Hill, near Andrijevica.
The town itself is not so old. As a town, it began to develop in the middle of the 19th century. At the centre of the town is Andrijevna Church built by Grand Duke Andrija Zahumski, the son of Grand Duke Miroslav of Hum, brother of Stefan Nemanja. The church is famous for its scribal activity and carving workshops which supplied all the surrounding monasteries with carved works. With the arrival of the Turks, the church was burned down several times, destroyed and rebuilt, and in 1877, during the campaign of Mehmed-Ali Pasha, it was completely demolished.
After the Montenegrin–Turkish war (1876–1878), Andrijevica became the centre of Upper Vasojevići or the Vasojevići Nahiyah, as they used to call this tribal region. It was the seat of Miljan Vukov, duke of Vasojevići and member of the Montenegrin Senate, who formed the first local institutions of Montenegrin state government in Andrijevica. The town became the military, administrative, political and trading centre of northern Montenegro, and they built here the buildings of the state government, handicraft shops and taverns. Andrijevica was also one of the most important cultural centres of Montenegro. In 1863, the second state school was opened here, and in 1892 the first reading room of the north and the second one in the country itself were established.