The shooting occurred in Sibi town, police officials said.
District police chief Awais Ahmed said four men riding two motorcycles had attacked a brothel.
The unidentified armed men barged into the brothel and fired indiscriminately at the people inside.
Four prostitutes and a man died instantly, while two other women were left injured.
No group claimed responsibility for the attack.