Michigan courthouse shooting: Two deputies and gunman killed
The officers, known as bailiffs in the US, provide security for courthouses.
The inmate, who was due in court, grabbed an officer's gun during a scuffle and opened fire, Berrien County Sheriff Paul Bailey said.
People in the courthouse took shelter before other officers shot and killed the inmate, Mr Bailey said.
A deputy sheriff and another person were also wounded and were taken to hospital, where they are in a stable condition.
The inmate was not identified, and Mr Bailey did not say what charges he was facing.
The shooting occurred is in the resort town of St Joseph - about 100 miles (160km) northeast of Chicago.
Mr Bailey called the deaths of his colleagues "terrible".
"Our hearts are torn apart. ... I have known them for over 30 years. It's a sad day," he said.
Kazinform refers to BBC.com