Officials say Timothy Mulqueen, 43, used a vestibule outside of the Middletown City Court to enter the building with a 12-gauge shotgun.
Authorities said he fired multiple times inside the courthouse on James Street toward New York State Court Officers near the entrance.
Court officers returned fire and shot the suspect. Mulqueen was transported to Orange Regional Medical Center, where he was pronounced dead on arrival.
Authorities said one court officer was injured and transported to Orange Regional Medical Center. The officer did not suffer a life threatening injury, officials said.
Two other officers were taken to a hospital for treatment for shock.
Court records show Mulqueen had a pending case involving menacing and other charges after an encounter with Mayor Joseph DeStefano's daughter at the mayor's home last August.
Get Eyewitness News Delivered