It happened at a home in the 6200 block of Melbourne Road, near Lake Wheeler around 11:55 a.m.
Authorities said 33-year-old Misty Michelle Mullins broke into a home and threatened to kill the woman inside with a three-pronged garden tool. She then fled the home left and broke into the home next door and refused to come out.
"She was aggressive with the neighbor and aggressive with our officers," said Wake County Sheriff Donnie Harrison.
Authorities said when Mullins came at officers with a knife or machete, she was shot and killed.
"That's our job. We hope we never have to shot someone, but unfortunately it does happen," said Harrison. "I just hate it for her family and our family, the entire law enforcement family."
Authorities say Deputy Gabriel Romero fired at Mullins when she raised her weapon after trying to use a Taser on her three times. Mullins was pronounced dead at the scene.
The SBI has taken over the investigation. Romero is on routine administrative leave.
Court documents show a protective order against Mullins was issued on May 3.
The man who asked for protection said she had assaulted him on April 25 and had threatened him with a knife and a baseball bat. The court order barred Mullins from his home on Melbourne Road and from the man's job.
A woman who owns property along Melbourne Road said Mullins used to rent the house where she was shot and killed. That landlord says she evicted Mullins at the beginning of May.