The 35-year-old victim was attacked outside Barclays Bank in London Road, North End, Portsmouth at about 15:20 BST on Saturday.
The men, aged 41 and 42, were arrested on suspicion of murder and conspiracy to murder. They are both in police custody.
It is understood the victim's injuries are not thought to be life-threatening.
Police said they are appealing for witnesses.
Two men have been arrested after a woman was stabbed in the back as she walked in a busy shopping street.