Mujahid (may Allah have mercy on him) says: Some men wanted to marry well-known prostitutes of the Days of Ignorance, and they were told: "This is unlawful." Concerning them Allah Almighty revealed this verse: "And that has been made unlawful for the believers" [Surah al-Nur: 3], meaning that Allah Almighty has made marrying them unlawful.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13864