Three army personnel were also killed in what police described as the largest anti-militant operation this year.
"Indian security forces launched a cordon and search operation in Kashmir's Shopian district early Sunday," Deputy Police Superintendent Yasir Qadri said. "Hiding militants opened fire at the troops, leading to gunfights which continued until late Sunday afternoon."
The operation resulted in violence between security forces and anti-government protesters who took to the streets. The unrest left four civilians dead, Director General of Police Shesh Paul Vaid said on twitter.
Thousands of residents also joined funeral processions for the slain militants late on Sunday.
Kashmir has long been a hot spot for armed conflict, as India, Pakistan and China all claim partial or complete ownership over the Himalayan region.
The division is rooted in the deadly partition of British India in 1947, which resulted in a predominantly Hindu India and a Muslim Pakistan, and left Kashmir divided.
The division has led to decades of conflict with numerous separatist campaigns and multiple wars between India and Pakistan.
Tension remains the highest along the 435-mile-long Line of Control, which separates the Indian and Pakistani controlled parts of Kashmir.
The separatist violence has killed more than 47,000 people since 1989, although this toll doesn't include people who have disappeared due to the conflict. Some human rights groups and nongovernmental organizations put the death toll at twice that amount.