The suspect in the shootings -- who was wearing body armor -- was killed during an exchange of gunfire with officers, said police Commissioner William Evans.
The officers were identified as Richard Cintolo, a 27-year veteran of the department, and Officer Matt Morris, a 12-year veteran. They underwent surgery at Massachusetts General Hospital and were listed in critical condition.
The slain man was identified as Kirk Figueroa, 33, of East Boston.
Evans confirmed media reports that Figueroa was a city constable, giving him the authority to serve warrants, subpoenas and other civil papers. CNN affiliate WBZ
reported that Figueroa was sworn into office in July.
Figueroa didn't have the right to possess the firearms that were found at his residence, Evans said.
Police received a call regarding a "domestic incident" between two male roommates in East Boston around 11 p.m., Evans said.
One man came out of the building and said his roommate threatened him with a large knife, Evans said.
Two officers went inside the residence and were met by a man displaying what appeared to be a "tactical" shotgun, Evans said. Earlier he said the man carried an assault rifle.
Officers outside the residence heard gunshots, entered the building and exchanged gunfire with the man, Evans said. Other officers dragged the two wounded officers outside and began providing first aid, he said.
Evans said police had no choice but to "neutralize" the suspect.
"We're not proud when we have to use deadly force. But obviously we had two officers gravely injured here, and it left no choice."
Nine additional officers were treated at Tufts Medical Center for minor injuries and stress, the police commissioner said.
Evans praised the officers for pulling their colleagues out of the line of fire, applying first aid and dealing with a life-threatening situation.
"Domestic calls are probably the most volatile. You never really know what you're walking into," he said.
The Suffolk County district attorney's office will investigate, as it does in all police-involved shootings.
"It's going to take time," District Attorney Daniel Conley said. "The two individuals who probably know most about what happened tonight are in Mass Gen (the hospital) fighting for their lives."