The castle was taken by the Cossacks in 1649 and the Turks in 1675. The events of 1649 are dramatized by Henryk Sienkiewicz in his novel "With Fire and Sword". Ivan Bohun was heavily wounded under the castle's walls. Ivan Mazepa and Peter I are known to have visited it in 1707.