Short answer
It depends on how much of their money is haram. If most of their income is halal, you may accept their gifts and food unless you know that specific thing came from haram. If most of it is haram, you should decline unless they tell you it came from a halal source. Something you know was stolen may never be accepted.
When most of a person's wealth is halal, accepting his gift or invitation is permissible unless you know the item itself is haram. When most of it is haram, accepting is not permitted unless he says the gift comes from a halal source, such as inheritance or a loan. Dependents supported by a parent with haram income are not sinful for eating at home, though they should encourage halal earning.
The four schools agree on this.
Explanation
Haram money is money earned through something Allah forbade: interest, gambling, selling alcohol, theft, fraud, bribes and the like. The sin of earning it is on the earner. The question is when it also affects someone who receives it from him.
The Hanafi jurists answer by looking at the person's wealth as a whole:
- Mostly halal: accept gifts and invitations. You do not need to investigate. The Prophet ﷺ bought food from and pawned his armour with a Jewish trader, though the Quran says some of them took usury.
- Mostly haram: do not accept, unless he tells you this particular gift came from something halal. Many people in this position have halal savings too.
- You know the item itself is haram: for example, stolen goods or a prize from a lottery. Do not accept it at all.
Family situations need wisdom. A child or spouse who depends on a parent or husband with haram income may eat and live at home; the duty of support is his, and the sin of the earning is his. Adult children who can support themselves should try to, and everyone can gently encourage the earner toward halal work. Refusing a parent's food in a way that breaks family ties causes its own harm, so ask a mufti about your case.
If you are unsure, the hadith on doubtful matters points to caution: whoever avoids the doubtful protects his religion. For what the earner himself should do, see What should I do with haram money?
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah Al-An'aam 6:164
قُلْ أَغَيْرَ ٱللَّهِ أَبْغِى رَبًّۭا وَهُوَ رَبُّ كُلِّ شَىْءٍۢ ۚ وَلَا تَكْسِبُ كُلُّ نَفْسٍ إِلَّا عَلَيْهَا ۚ وَلَا تَزِرُ وَازِرَةٌۭ وِزْرَ أُخْرَىٰ ۚ ثُمَّ إِلَىٰ رَبِّكُم مَّرْجِعُكُمْ فَيُنَبِّئُكُم بِمَا كُنتُمْ فِيهِ تَخْتَلِفُونَ ﴿١٦٤﴾
Say, "Is it other than Allah I should desire as a lord while He is the Lord of all things? And every soul earns not [blame] except against itself, and no bearer of burdens will bear the burden of another. Then to your Lord is your return, and He will inform you concerning that over which you used to differ."
The sin of haram earning is on the one who earned it.
Sahih al-Bukhari 2068
Sahih... اشترى طعاما من يهودي إلى أجل ورهنه درعا من حديد ...
"He bought food from a Jew on credit and pawned an iron armour with him."
Dealing with someone whose wealth is mixed is permitted.
Sahih al-Bukhari 52
Sahih... فمن اتقى المشبهات استبرأ لدينه وعرضه ...
"Whoever avoids the doubtful matters keeps his religion and honour clear."
When the source is mostly haram, caution is the rule.
Where the ruling is recorded
- al-Fatawa al-Hindiyya, Kitab al-Karahiyya, chapter on gifts and invitations. The rule of judging by whether most of the giver's wealth is halal or haram.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Hazr wa al-Ibaha, on accepting gifts from those whose wealth is mixed. Applies the majority rule and the exception when the item is known.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.