The detainees reportedly killed a soldier after escaping from central Moroto before heading for the hills.
The army and prison officials are pursuing the escapees, who reportedly fled with 15 rifles and ammunition.
An army spokesperson said two detainees were captured and two killed.
The prison is built on the foothills of Mount Moroto, on the outskirts of town.
According to an Associated Press report, the inmates removed their distinctive yellow uniforms and fled naked into the hills to avoid detection.
Local reports say the shooting halted business in Moroto.
Moroto is the largest city in Karamoja, a troubled region with a history of cattle rustling and gun violence, reports the BBC’s Patience Atuhaire from Kampala.
A government disarmament program in the early 2000s took most of the weapons from civilians, but sporadic clashes between different communities continued to occur, our correspondent noted.