DO WE BLESS ON EATING ISUR [Mitzvah ha'Ba'ah b'Aveirah :Birkas ha'Mazon]
Gemara
(Beraisa - R. Eliezer ben Yakov): If one stole wheat, ground it, kneaded and baked it and separated Chalah from it, his Berachah only angers Hash-m - "a thief who blesses, blasphemes."
(Abaye): He holds that Ein Shinuy Koneh (changing a stolen object does not acquire it).
Rejection (Rava): Perhaps he holds that Shinuy Koneh. However, one may not bless because it is a Mitzvah ha'Ba'ah b'Aveirah!
Berachos 45a (Mishnah): We do not count for a Zimun (a preface before Birkas ha'Mazon) one who ate Tevel (untithed produce). We count one who ate Demai (Safek Tevel).
Rishonim
Rambam (Hilchos Berachos 1:19): If one ate Isur, whether b'Mezid or b'Shogeg, he does not bless on it before or after.
Rebuttal (Ra'avad): The Gemara did not say that we do not bless on it. It said only that we do not make a Zimun on it, for this is not considered Kevi'us (fixed to eat together), just like eating Peros. Why shouldn't they bless?!
Rosh (Berachos 7:2): I agree with the Ra'avad. The Gemara in Bava Kama says that one who blesses blasphemes. This connotes that he must bless, just it angers Hash-m.
Poskim
Shulchan Aruch (OC 196:1): If one ate Isur, even an Isur mid'Rabanan, he does not bless on it before or after.
Question (Beis Yosef OC 196 DH Kosav ha'Rambam): Why did the Rosh reject the Rambam? The Yerushalmi forbids blessing on stolen Matzah. Do not say that Matzah is different, because it is a Mitzvah. Also Birkas ha'Mazon is a Mitzvah! The Beraisa 'one who blesses blasphemes' supports the Rambam. Our text says 'how will he bless?!' Also according to the Rosh's text, we can explain 'if he will bless, this angers Hash-m. Therefore, he should not bless.' A Tosefta (Demai 2:14) says 'one may not give wine to a Nazir... we do not bless on these or answer Amen.' It seems that Rashi and R. Yonah agree. The Rashba brings a proof from Shabbos 23a, which says that we make an Eruv with Demai (it is permitted to an Oni), bless on it, and make a Zimun with it. This implies that we do not bless on Tevel. It is difficult to say that 'we bless' (is no Chidush, for we bless even on Tevel, and) was merely included with the other matters.
Taz (1): The Rosh agrees that it is better not to bless than to anger Hash-m. The Ra'avad agrees that one who ate Isur b'Mezid does not bless. He argues only about one who ate b'Shogeg. All hold that the Mishnah in Berachos discusses one who ate b'Shogeg, for we do not make a Zimun with a Rasha. The Rambam holds that it is as if he did not eat at all. Similarly, if one bought an Isur mid'Oraisa and ate it; he gets back his money (YD 119:13). Regarding Berachos, even if he ate an Isur mid'Rabanan, it is as if he did not eat.
Bach (DH u'Mah she'Chosav): Even if one does not bless on Isur, all agree that if one acquired it through Shinuy, he blesses afterwards. The Yerushalmi brings an argument about blessing beforehand in this case. The Halachah is that we bless, like Rava says in the Bavli; he acquires and must bless, but he angers Hash-m. If one stole Matzah, all agree that one does not bless before eating it, for he did not acquire it. He does bless afterwards.
Magen Avraham (1): The Beis Yosef says that even if one ground stolen wheat and baked it, and acquired through Shinuy, he does not bless before or after. The Mechaber (649:1) and Rema (454:4 and 11:6) say similarly about a stolen Lulav, Matzah or Tzitzis acquired through Shinuy. However, the Magid Mishneh says that the Rambam holds that one is Yotzei with Matzah in such a case. Hence (based on the Rambam in Hilchos Berachos) one blesses on it. One should rule like this; Birkas ha'Mazon is mid'Oraisa, so we must be stringent. Perhaps even one who ate stolen bread blesses, for he acquired it through eating. Also, the Beis Yosef was in doubt in Siman 649, so we must be stringent about Birkas ha'Mazon. The Bach is unlike the Magid Mishneh.
Gra (2): The Mishnah (Demai 1:4) says that we bless on Demai. This implies that we do not bless on (absolute) Isurim.
R. Akiva Eiger (1): Mid'Rabanan, one may not knead bread with milk (or lard), lest one eat it with meat (or milk). This is not such an Isur (so one blesses on it), especially since the Kreisi permits to give a small amount to each of many people. This is like Demai, which is permitted if one is Mafkir his property.
Eshel Avraham (168 Sof 16): One does not bless on such bread.
Mishnah Berurah (1): One does not bless even on Heter that one forbade to himself.
Mishnah Berurah (4): If one ate b'Shogeg, some say that even if he was not satiated, he blesses afterwards. Some say that even if one ground stolen wheat and baked it, and acquired through Shinuy, we are more stringent about Berachos. He does not bless before or after, for this would anger Hash-m.
Kaf ha'Chayim (2): Opinions differ about whether or not he blesses after eating Gezel. One should bless, lest he increase his sin, but first he should repent and resolve to pay for the theft. One only thinks the Berachah beforehand, but does not say it.
Kaf ha'Chayim (5): Mishbetzos Zahav says that one blesses after a Safek Isur mid'Rabanan, but not after a Safek Isur mid'Oraisa.
Shulchan Aruch (2): If one ate Isur due to danger, he blesses on it.
Beis Yosef (DH ha'Ochel): R. Yerucham says that the Ramah holds that one who ate Isur due to danger does not bless on it. I say that the Rambam would agree that he blesses on it.
Rebuttal (Taz 1): The Rambam would equate this to eating b'Shogeg, and say that he does not bless. However, l'Halachah, since he was permitted to eat Isur, his Berachah does not anger Hash-m. Therefore, he must bless.
Kaf ha'Chayim (8): Many say that he blesses, but the Birkei Yosef disagrees. We are lenient about Safek Berachos. Therefore, he should bless on Heter to exempt the Isur, or only think the Berachah in his heart.