An Indian military spokesman said troops ambushed the rebels after they crossed the Line of Control in the Mendhar area of Poonch district, 210 kilometres northwest of the winter capital Jammu.
"The militants are trapped and five of them have been killed. The operation is continuing," said the spokesman, who added that more rebels may have crossed.
It was only the second time India has alleged an infiltration bid by fighters from Pakistani territory since a border truce went into effect on 26 November.
The Indian claims could not be verified. Groups fighting for separation from India accuse New Delhi of killing civilians and dressing up their deaths as being caused by military clashes, known as "fake encounters".
The pro-rebel Kashmir Media Service reported that five Kashmiri men had been slain, one of them in a "fake enocunter".
Two were shot dead during a "so-called search operation in Manjakot area of Rajouri district", it said on its website.
The operation followed a clash in which one Indian soldier, identified as Subramaniyam, was killed and another injured, it added.
Two more men were gunned down by troops of the Rashtriya Rifles in the Kokernag area of Islamabad district, according to the organisation.
India and the rebels have both said the border truce does not apply to their operations inside Kashmir.
More than 40,000 people have died in the separatist insurgency in the majority-Muslim Kashmir since 1989, according to Indian figures.
However, separatists and Pakistan put the toll between 80,000 and 100,000.
Pakistan denies Indian charges it foments the rebellion and says it provides only moral and diplomatic support to an 'indigenous' uprising against what Muslims regard as New Delhi's occupation.