A Mosque Built with Unlawful Money
Question
Thirty-five years ago a prostitute who practised fornication as a trade lived with a Hindu. She had ten to fifteen thousand rupees from this unlawful earning. She thought that if a Jami‘ mosque were built with this money in the small town of Mathura, there would be great reward. With this thought she had a very magnificent Jami‘ mosque built in the town.
Answer
There are details regarding buying something with haram money: in some cases the sale is entirely impermissible and prohibition enters that thing, and in some cases prohibition does not enter that thing and the sale is valid.
Source: Fatawa Mahmudiyya
Preview. The full text opens with JavaScript enabled.