During the 2016 Nagorno-Karabakh clashes, he was a deputy commander of the military unit N situated in Tartar. During the clashes, he fought alongside Polad Hashimov, took part in the clashes near the Ohanyan defense line and the capture of the heights around Talış. From 2017 to 2018, he served as deputy commander of personnel unit N situated in Aghjabadi. Safarov was released from active military service by the order of the Azerbaijani minister of defense in 2018. Safarov, despite being discharged from the armed forces in 2018, voluntarily appealed to the military commissariat on 27 September to serve on the frontline during the 2020 Nagorno-Karabakh war. In early October 2020, he began to serve as an officer, and took part in the Aras Valley campaign and Lachin offensive. He was then transferred to Shusha, and fought during the three-day battle over the city's control.