The attack occurred in Nadimarg, about 30 miles south of Srinagar, the summer capitaal of India's northern Jammu-Kashmir state.
The dead included 11 men, 11 women and two children, said A.K. Suri, the state's police chief.
Suri told a television news channel that a group of more than 15 armed men, using automatic weapons, attacked some 55 upper-caste Hindus — known as Kashmiri Pandits — living in the village.
Another police officer in Srinagar told The Associated Press that the attackers overpowered the security guards at the village, snatched their weapons, and then began firing at the villagers. Two of the eight security guards, who routinely patrol the village, were missing, the officer said on condition of anonymity.
Suri did not comment on the identity of the attackers, but said Islamic militants might be involved as part of their efforts to drive away Hindus from the valley.
"This is not the first time it has happened," Suri said, adding militants have carried out similar massacres in the past, causing an exodus of Hindus from the region.
The Himalayan province of Jammu-Kashmir is India's only Muslim majority state, where most Muslims inhabit the Kashmir valley in the north, while the Jammu region in the south is predominantly Hindu.
More than 300,000 Hindus have moved out of the valley since 1989 after Islamic militants began fighting for an independent Kashmir, or its merger with Pakistan.
The attack Monday came one day after unidentified gunmen assassinated an Islamic guerrilla leader who was sacked from Kashmir's biggest rebel group after reportedly holding secret talks with the Indian government.
The assassination of Abdul Majid Dar, former Kashmir commander of the Hezb-ul Mujahedeen, was a setback for Indian security authorities, who were trying to persuade him to take up a possible political role in the state wracked by 13 years of separatist violence.
India accuses Pakistan of sponsoring the 13-year insurgency, which has killed more than 61,000 people. Pakistan denies the charge, saying it only supports the rebels' cause and does not give them any material aid.
The South Asian nuclear rivals fought two of their three wars over control of Kashmir, which both claim in its entirety.