Jerry Brinkley was with his two grandchildren when they saw the suspect, Michael Bell, flee the courthouse.
"This guy came out in a prison jumpsuit and had a gun to his side. I heard two shots before he ran out the door," Brinkley told NewsChannel 5. "I grabbed my granddaughter and went to the other side of the building because I didn't know what he was going to do."
He went inside the building and saw the deputy on the ground and knew the man he saw with a gun shot him.
"I thought that he had been shot because he wouldn't move and he kept holding his stomach and slumped over the floor," Brinkley said.
Brinkley's 16-year-old grandson Deyonque Williams said he entered the courthouse first and saw Bell shoot one of the deputies before the gun was pointed at him.
"I was four to five feet from where the officer was shot," Williams said. "I had the door open and he just walked out and pointed the gun at me and told me to get out of the way."
Aside from the two deputies, no one else was injured.
Coffee County officials said Bell died from a self-inflicted gunshot wound after escaping the courthouse.