The heavily armed men attacked the infantry base housing hundreds of soldiers in Uri, west of the region’s main city of Srinagar, officials said.
Four of the attackers were killed in the attack that saw tents and other temporary shelters accommodating the soldiers catch fire.
Indian Army, in a statement, has confirmed that 17 soldiers were killed whereas four attackers lost their lives in the clash.
Large numbers of soldiers are stationed at Uri after finishing their tour of duty in the volatile region, where several groups have been fighting troops for decades for independence of the region or its merger with Pakistan.
Residents of nearby Uri town saw smoke billowing from the base after dawn and heard continuous rounds of heavy gunfire, while army helicopters circled the base overhead.
The region has been in the grip of deadly unrest for more than two months, with protesting residents clashing almost daily with security forces, in the worst violence since 2010.
At least 87 civilians have been killed and thousands injured in the protests against Indian rule, sparked by the killing of a popular rebel leader in a gun battle with soldiers on July 8.
Kashmir has been divided between Pakistan and India since the two gained independence from British rule in 1947.