A suspect, believed to be a farmer in his 30s, was holed up inside a building after the incident, which also left a fourth person injured, according to police and media reports.
The suspect's mother escaped from the building where he was hiding, Kyodo News reported late Thursday.
Authorities urged people to stay indoors in the semi-rural area around the city of Nakano in Nagano region, where the attack took place.
It was a rare instance of violent crime in Japan, which has a low murder rate and some of the world's toughest gun laws.
Public broadcaster NHK and other major outlets said the woman was stabbed and the two police officers were shot in the afternoon attack.
The slain officers were identified as Yoshiki Tamai, 46, and Takuo Ikeuchi, 61, a Nagano police spokesman told AFP early Friday.
The deceased woman was believed to be in her 40s or 50s, the spokesman said.
Two women had escaped the house where the suspect was holed up, one at around 8:35 pm (1135 GMT) and the other soon after midnight, he added.
A witness told NHK he had been working at a farm nearby when "a woman came running from the road saying 'help me', and she fell down".
"Behind her came a man wearing camouflage and carrying a large knife, who stabbed her in the back," the 72-year-old witness said.
He said he called emergency services while neighbors tried to resuscitate the woman.
NHK, citing police, said the attacker then fired what appeared to be a shotgun at the police officers who arrived at the scene.
The officers were inside a patrol car and the attacker placed the weapon against a window of the vehicle and fired twice, NHK reported.
Another man was injured in the attack but could not be rescued because he was too close to the building where the suspect has taken shelter, Kyodo News said.
Japan was left reeling in July last year when former prime minister Shinzo Abe was shot dead in broad daylight with an apparently homemade gun.
Abe's accused assassin, Tetsuya Yamagami, reportedly targeted the politician over his links to the Unification Church.
And last month, a man was arrested for allegedly hurling a pipe bomb-like explosive towards Prime Minister Fumio Kishida as he campaigned in the western city of Wakayama.
Kishida was unharmed and a man arrested on the scene will undergo a three-month psychiatric examination, a regional court said this week.
The suspect has reportedly remained tight-lipped about his motive for that failed attack.
© 2023 AFP