Col Mikolaj Przybyl was defending a military investigation into media leaks related to the air crash that killed the Polish president in 2010.
He asked reporters to leave so that he could take "a break".
Upon hearing a loud thud, the reporters returned to find him on the floor with a pool of blood around his head.
Mr Przybyl, who was in his office in Poznan, western Poland, is now in hospital in stable condition. His life is not in danger, according to hospital officials.
One of the reporters present told Polish television: "We heard a loud thud and we went back into the room thinking one of the cameras had fallen over. Then we saw the prosecutor motionless on the ground in a pool of blood, his military gun beside him."
In television pictures of the news conference, Col Przybyl is seen reading out a statement to reporters: "During my entire service as a civilian and later military prosecutor, I have never brought shame to the Republic of Poland and I will protect the honour of an officer of the Polish armed forces and prosecution. Thank you, please give me a five-minute break, I need to rest."
He then walks out of shot and the sound of a gun being cocked can be heard followed by a loud bang.
At the news conference, Mr Przybyl had denied prosecutors in Poznan, western Poland, had eavesdropped on journalists who were investigating the crash, AFP news agency reports.
Polish President Bronislaw Komorowski has said in a statement he was "concerned" about the incident and had asked the head of the national security bureau to monitor the situation.
The plane taking then President Lech Kaczynski's delegation to a memorial service for the victims of the 1940 Katyn massacre of Polish officers by Soviet secret police crashed in thick fog in Smolensk, western Russia, on 10 April 2010.
As well as MR Kaczynski, his wife and 94 senior officials also died when the jet tried to land.
Investigators blamed pilot error.
A Polish military prosecutor has shot himself in the head after cutting short a news conference in his office, officials and media reports say.