Oster was founded in 1098 by Vladimir II Monomakh as Gorodets, a fortress belonging to the Pereiaslav principality, which was later inherited by his son Yuri Dolgorukiy.
In the beginning of the 14th century, a newer settlement arose closer to the Desna, named Oster.
From 1356 Oster was under control of the Grand Duchy of Lithuania, and from 1569 under the Union of Lublin which was part of the Polish–Lithuanian Commonwealth.
In 1622, King Jan II Casimir granted Oster the Magdeburg rights and a coat of arms.
After harsh battles of the Khmelnytsky Uprising, Polish rule was again established in Oster, but in February 1664, with support from the local population, the Poles were driven back by Cossacks and the Russians.