The man, whose name was not known, was shot in the left shoulder. He was later taken to hospital, reports the Bangkok Post.
The woman was uninjured.
The drama began around 9.30am when a man entered a motorcycle repair shop in Theparak community in Muang district. He was armed with an M61 hand grenade and he took the shop owner’s wife hostage.
Police had earlier on Thursday gone to the community in response to complaints about repeated thefts. Residents alleged that a homeless scavenger was responsible, said Khon Kaen Police Chief Maj Gen Nopphakao Sommanat.
The officers found the man in the area with his pushcart, he said
They searched him and the cart and found an 11mm pistol and 10 bullets in his possession.
The man then produced an M61 hand grenade, and held it in his hand. The officers tried to persuade him to lay it down, but he refused. The man bolted, running through the community and into the motorcycle repair shop where he took the owner’s wife hostage, Maj Gen Nopphakhao said.
While police tried unsuccessfully to persuade him to release the woman, a rescue operation was mounted.
They also tried to communicate with the woman, sending her signals to be prepared.
When the time was deemed right, the woman was signalled to run away, and special weapons and tactics (SWAT) police fired shots at the hostage-taker.
The man was hit in the left shoulder. He fell down and the officers moved in to take the grenade from his hand. He was taken to hospital.
Explosive ordnance disposal officers then cleared the area, ending the three-hour hostage drama.
Maj Gen Nopphakao said initial checks found no record of the man or a permanent residence. There was also no confirmation of reports he was a former paramilitary ranger. Checks were continuing.