Officers were called to Shepperton Road in Islington, north London, shortly after 23:00 BST on Thursday and found a 40-year-old man threatening the woman.
A police negotiator and firearms officers were called. Shortly before 01:00 on Friday a number of shots were fired at the man by police.
He was pronounced dead en route to hospital.
The woman was unharmed but is being treated for shock.
Police believe the man and woman were known to each other.
Lyssa Barber, a neighbour who works in recruitment for a bank in the City, said: "I was woken up to shouts and immediately afterwards to what sounded like four or five bangs. They were gunshots.
"I think I heard five gunshots, but a gunshot in real life doesn't sound like it does on TV.  It sounded like loud bangs on a door.
She added: "The ambulance arrived as I was looking out of my window. Police came out of the house. We could see someone being led away. I'm fairly sure they were wearing pink and had to be supported by officers."
Rosa Whiteread, 28, who lives in the street, said: "I was asleep and I heard shouting - it woke me up.
"I looked out of the window and I saw lots of police, there must have been around a dozen of them. I asked them what was going on, but they said they couldn't tell me.  It's shocking."
The Metropolitan Police said in a statement: "As in any shooting, officers from the Met's Directorate of Professional Standards have been informed and this incident has been referred to the Independent Police Complaints Commission."
The fatal shooting comes less than a day after an 82-year-old was killed in a suspected beheading in Edmonton, which is about eight miles from Shepperton Road.
Met Police Cdr Neil Basu said: "Over the last 24 hours in London we have seen a number of high-profile incidents and I would like to take this opportunity to say that incidents of this nature are rare and that London continues to be a very safe city."
Police have shot dead a man who broke into a house and threatened a woman with a knife.