A spokesman for the local government of Bornheim said the ban on male asylum seekers above the age of 18 came after six people filed complaints "over the sexually offensive behaviour of some migrant men at the pool".
The measure aimed at "making it clear to the men that the right of women in Germany is inviolable", he added.
Officials have gone personally to three asylum seeker shelters near the pools to deliver news of the ban and emphasise how people should behave in swimming pools, said the spokesman.
Authorities denied placing entire groups of people under suspicion, but said the measure was aimed at laying down clear ground rules.
More From This Section
Public distrust of asylum seekers has grown in Germany after it emerged that hundreds of women were groped and robbed in a throng of mostly Arab and North African men during New Year's festivities in Cologne.
An opinion poll for public television ARD found that 48 per cent of respondents said they were afraid of refugees, while 50 per cent said they did not feel that way.
Germany took in 1.1 million asylum seekers in 2015, mostly from Syria, Afghanistan and Iraq.