Shortly before 8.20pm on Saturday night, at least two men wearing balaclavas, one armed with a shotgun, approached two males in Rudding Street, Crosland Moor.
The victims, aged 26 and 27, started running away down a ginnel when shots were fired.
The pair managed to continue running from the scene and were taken to hospital.
Detective Chief Inspector Jim Dunkerley, of the Homicide and Major Enquiry Team, said: “We are treating this as a targeted attack.
“We know that at least two men were involved and there may have been a third and also believe that these men have used a white Audi A3 in this incident.
“The two victims were treated at hospital for minor injuries and have since been released.
“We received several calls from members of the public and have spoken to a number of people in the vicinity but are still keen to speak to anyone else who was in the area who either witnessed the incident itself or the events leading up to or following these shots being fired. We would also like to hear from anyone with information about those involved.
“Anyone with information is asked to call the Homicide and Major Enquiry Team via 101. Information can also be given anonymously to independent charity Crimestoppers on 0800 555 111.”