It happened in Shawnee, Kansas, over the weekend, police told CNN.
Two men attacked the 39-year-old mother as she was putting her baby in a car seat. They struck her in the back of her head, said Shawnee police Maj. Dan Tennis.
Hearing the mother's screams, the good Samaritans rushed to help.
One of them, 33-year-old Air Force veteran Joshua Owen, was shot multiple times when one of the attackers, later identified as John W. Simmons III, pulled out a gun.
The second rescuer, who has yet to be identified, had a gun of his own and he fired back, killing Simmons, police said.
The baby wasn't hurt.
Police later caught the second suspect, 27-year-old Arthur Fred Wyatt III.
On Tuesday, Wyatt was charged with attempted first-degree murder charges, aggravated kidnapping and attempted aggravated robbery. He pleaded not guilty and is being held in Shawnee jail.
Owen, the wounded good Samaritan, remains hospitalized.
Owen's sisters-in-law created a GoFundMe page
to help cover the cost of his medical and living expenses while he's recovering. In just seven hours, the campaign raised nearly $30,000.
"We are so very grateful for the outpouring love and support from everything. We are so overwhelmed with emotions," Leslie Owen, the wounded man's wife, said in a message to CNN.
Brittany Parks, one of the sisters-in-law, also provided a statement from Owen's 15-year-old daughter Halle: "To me, my dad is a hero. He risked his life trying to save someone else's. I love him with all my heart and I'm so thankful that he is going to be fine. I'm so thankful that the people were there to help my dad. Without them, I would've lost the best dad that I could've ever asked for."
The woman who was attacked has been released from hospital and reunited with her baby.
The second good Samaritan, a 36-year-old De Soto, Kansas, man, was interviewed by police and released.
The mother didn't know the suspects.