In DS9 Empok Nor Garak tries to provoke Chief O'Brien by reminding him of being a soldier in the Federation-Cardassian War.
GARAK: This is maddening. Asking a Ferengi to play a Cardassian game is like asking a Klingon to chew with his mouth closed. Kotra is not about regrouping or hoarding assets. It's about bold strategy and decisive action. Chief, would you like to take on the winner? I'd love to play Kotra against the hero of Setlik Three.
O'BRIEN: What is that supposed to mean?
GARAK: Oh, we all know your distinguished war record. How you led two dozen men against the Barrica encampment and took out an entire regiment of Cardassians. If you play Kotra with half that brazenness, we'd have quite a match.
O'BRIEN: I'm not a soldier anymore. I'm an engineer.
O'Brien makes it very clear: he doesn't want to be a soldier, and no hero. Later that episode he put some emphasis to that statement by disabling Garak with a MacGyvered trap rather than a shoot-out.
It is speculation, but it is quite possible, that after the war, he asked for a reassignment, where he has nothing to do with battle or fighting. Since this is his area of expertise, doing something completely different would mean, that he'd have to start his career at the scratch. The position of the transporter-chief on the flagship would be as far away from battle as you can be, so he starts his way upwards there - as a petty officer.