The suspect in the shootings -- who was wearing body armor -- was later killed during an exchange of gunfire with officers, said police commissioner William Evans.
Police received a call regarding a "domestic incident" between two male roommates in East Boston around 11 p.m., Evans said. When officers entered the home, they could be heard on their radios screaming "303" -- which means shots fired and "officer down."
Officers dragged their wounded colleagues to safety as more shots were exchanged. The suspect had an assault rifle and wore a ballistic vest, Evans said.
He said police had no choice but to "neutralize" the suspect during the incident.
"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."
The two injured officers are in critical condition at Massachusetts General Hospital and both are expected to have surgery, Williams said early Thursday morning. The two men have not been identified, but were longtime members on the police force, with one having served 28 years and the other for 12 years.
Nine additional police officers were being 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 the incident, as it does for all police-involved shooting.
"It's going to take time," said District Attorney Daniel Conley. "The two individuals who probably know most about what happened tonight, are in Mass Gen (the hospital) fighting for their lives."