It followed reports of a shotgun being fired at a flat in Swarcliffe shortly before 11.15pm on Friday.
Nobody was injured, but damage was caused to a window of the flat in Langbar Garth.
A police spokesman said a lone male suspect had been seen running away from the scene.
"As a result of enquiries five men, aged 20 to 31, were arrested on suspicion of firearms offences in a number of operations involving armed officers," he said.
"They were interviewed and later released pending further enquiries."
Anyone who witnessed the incident or who has any information is asked to contact West Yorkshire Police's Homicide and Major Enquiry Team via 101, quoting Operation Posyhill.
Information can also be passed on to the independent charity Crimestoppers anonymously on 0800 555 111.