The man's gun went off a third time, with that bullet lodging in the ceiling of the First Baptist Church in Norwood, KOLR-TV, Springfield, reported.
Wright County Sheriff Glenn Adler said one of the men who subdued the gunman suffered a minor shoulder injury, but no one else was hurt.
Adler said the gunman may have mental health issues and had been involved in another incident at the church about a month earlier.
"He may be upset with the church for reasons that I cannot say right now," the sheriff said.
The man, whose name had not been released, was jailed pending charges, the TV station said.