The attacker's representative has revealed that the Santiago Bernabeu side were keen to lure him to La Liga
The Poland international signed a five-year deal with the Bundesliga champions on Saturday to bring a protracted transfer saga to an end.
However, Barthel has revealed that Madrid were keen to sign Lewandowski, too, and were willing to go far for the 25-year-old.
"There was an immoral offer from Real Madrid," the striker's representative was quoted as saying by Spiegel Online.
Madrid were reportedly willing to offer Lewandowski an annual salary of €9.5 million plus an additional €10m signing fee, but Barthel has made it clear that they never considered breaking their promise to Bayern.
He added: "We listened to their offer out of respect for such a big club. But breaking our word never crossed our mind."
Lewandowski has been in sublime form for Dortmund this season, scoring 11 goals in 17 Bundesliga appearances.