Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
Abbas I's Shirvan campaign took place in 1606–1607, during the Ottoman–Safavid War of 1603–1618. The Safavids had lost control over the province by the Treaty of Constantinople of 1590. In the winter of 1606, Safavid king (shah) Abbas I (r. 1588–1629), invaded Shirvan. Derbent and Baku soon fell as a result of pro-Safavid uprisings and in the spring of 1607 Abbas I and his men successfully besieged Shamakhi, the provincial capital of Shirvan. With the reconquest of Shirvan, the Safavids had recovered all territories lost to the Ottomans in 1590. (seeTreaty of Nasuh Pasha)
Emiralioğlu, Pinar (2014). Geographical Knowledge and Imperial Culture in the Early Modern Ottoman Empire. Ashgate Publishing, Ltd. ISBN978-1472415332.