Police said officers and paramedics responded to reports of a disturbance at the Bowen motel at 5.30am on Thursday.
"He was unclothed at the time and some of the things that he was saying have drawn attention from some members of the public," Mackay district Superintendent Graeme Paine said.
The man allegedly entered the motel before returning with a large cane knife, threatening police and paramedics before being shot.
Emergency services tried to revive him but he died at the scene.
"The male person there did threaten the place," Queensland Police Deputy Commissioner Shane Chelepy said.
A man has been shot by police following a disturbance at the rear of a motel in Herbert Street, Bowen this morning.— Queensland Police (@QldPolice) https://t.co/2lDuHoMkHx pic.twitter.com/VPz1ISq453December 13, 2023
"It's unfortunate but at times police have to take lethal force to deal with that matter."
A crime scene has been declared.
Supt Paine said the incident occurred in close quarters and the officer made an assessment of the situation before firing.
"Those factors can include the distance where someone is, the speed that it's happening, the type of weapon that the person has," he said.
"That will inform basically whether the officer feels its more appropriate to use capsicum spay, a taser or a firearm.
"What I can say about this incident is that it occurred very quickly in a very confined space."
The man's family has been notified of his death.
"It's a terrible situation for the family and for the male person who has passed away," the deputy commissioner said.
"It's a terrible situation for our police to be in. No police officer wants to be placed in that situation."
The incident will be investigated by the police ethical standards command on behalf of the state coroner, subject to oversight by the Crime and Corruption Commission.