The siege at a house in Bangkok's Sai Mai district, where a police officer had been firing gunshots since Tuesday morning, ended shortly after noon on Wednesday.
Pol Lt Col Kittikarn Saengbun, 51, an inspector attached to the Special Branch Bureau, was shot and wounded by police commandos at 12.19pm, ending the 24-hour long standoff, police said.
The wounded man was taken to hospital and later died.
No other people were injured.
The siege was in its second day, with the police inspector inside the house refusing to surrender.
Police had been at the scene since Tuesday, after shots were heard at the house around 11am. He began firing shots into the air and inside his house on Tuesday and overnight.
More shots were fired on Wednesday morning. A policeman in the street outside was hit on his helmet by a bullet, but was unhurt.
Negotiations to calm the agitated officer down failed. The officer reportedly fired more than 50 gunshots on Tuesday into Wednesday.
Around 2.30am on Wednesday, officers fired about 20 tear gas canisters into the house.
At 5.05am, officers moved closer to his house, placing a ladder up to the second-floor balcony. Stun grenades were thrown into the house.
At 10.57am, Pol Lt Col Kittikarn reportedly agreed to hold talks via mobile phone, and he asked for cigarettes.
At 11.25am, television news reported that police had entered the first floor of the house.