First mentioned in a chronicle of 1100, when it was in possession of Yaroslav the Wise's grandson David of Brest, Dubno was even a seat of local princes for a short period of time. In the early 14th century it was annexed by Poland with the rest of Halych-Volynia. Later, it became a notable royal stronghold guarding that country's eastern border. Granted city rights in 1498, the town attracted many foreign settlers, most notably Jewish and Armenian. As such, it became the seat of one of the oldest and most vibrant Jewish communes in Central-Eastern Europe. Since 14th century owned by the mighty Ostrogski family, who built the Dubno Castle during the times of Konstanty Wasyl Ostrogski (Ostrozhsky). Between 1489 and 1506 the castle was significantly expanded by Konstanty Ostrogski, who made it a modern fortress, one of the strongest in the area.
With the death of Janusz Ostrogski in 1619, the last of his kin, the area was inherited by his brother-in-law Aleksander Zasławski of the cadet branch of the Ostrogski family. About that time it was again modernized to stand up to the standards of renaissance warfare and modernization of artillery. Finally, in 1753 it was sold to the Lubomirskis following the Treaty of Zdołbunów.
In the 1780s the castle underwent yet another modernization and was rebuilt as a residential manor, mostly losing its fortified character. By that time, the town was the largest settlement of the Volhynian Voivodeship and arguably the most notable centre of the area. Annexed by Imperial Russia in 1795 during the Partitions of Poland, the town initially flourished as the szlachta register was moved there from Lwów. However, after the third partition it was moved to Kiev and the town lost its importance, gradually falling into neglect. In 1870 it was declared a Fortified Town, which imposed serious limitations on settlement and housing construction, further limiting the development. However, it remained a notable centre of commerce, most notably because of numerous Czech settlements around the town, that gave it the nickname of the brewery of Volhynia. The castle was ruined in 1915 during the World War I.
Retaken by Poland in 1918 and finally granted to that state in the Peace of Riga, it was a seat of a powiat and a notable military garrison of both the KOP, and the Polish Army, with the 43rd Rifle Regiment (part of the 13th Kresy Infantry Division), and the 2nd Regiment of Mounted Artillery (part of Volhynian Cavalry Brigade) stationed here. Dubno also was the seat of Papal Eastern Seminary (Papieskie Seminarium Wschodnie). In 1935 a large prison was started to be built, the third biggest in Poland at that time. Between 1932 and 1939 the castle was being rebuilt in its original form, but the works were stopped by the outbreak of World War II. In 1937, its population was app. 15,500, out of which Jews made 45%, Ukrainians 29%, and Poles 26%.
Occupied by the Soviet Union following the Molotov-Ribbentrop Pact of 1939, it was subject to harsh policies of the NKVD. The uncompleted prison was taken over by the NKVD in December 1939 and was used for political prisoners from all parts of Soviet-annexed Poland. Between 1500 and 3000 prisoners were kept there in harsh conditions, with new inmates arriving after the previous ones were successively transported to Gulag and other Soviet prisons. In 1940 most of the local Poles were arrested and resettled to various Soviet Gulags and prisons throughout the USSR. In 1941, following the outbreak of Soviet-German War, on June 24 and June 25, 1941, approximately 550 prisoners of the Dubno prison were executed by the withdrawing NKVD while only 8 of them survived. About that time in the vicinity of the town (and around Lutsk and Brody) a large tank battle was fought. In the Battle of Brody (1941) the German 1st Panzer Group under Ewald von Kleist managed to break the counter-attack by Soviet 9th and 19th Mechanized Corps, and 8th Mechanized Corps. 8th Corps Tank Group took Dubno and held it for 5 days before it was retaken by stronger German forces' (under Konstantin Rokossovski, Nikolay Feklenko and D.I Rybjasev, Commander of 8th Corps Tank group was brigade commisar N.K. Popel, respectively). Soon afterwards the town was occupied by Germany.
In the second half of 1943, Dubno became a shelter for ethnic Polish population of Volhynia, who came here to escape the Volhynian Genocide. The town was defended by a unit of Polish self-defence, which was tolerated by German authorities. On February 28, 1944, the Germans evacuated Poles from Dubno to Brody, and then to the Reich, where they became slave workers.