Simpsons aficionados among you already know that the Simpsons addressed the issue of immigration back in 1996, in the episode “Much Apu About Nothing”. Here’s a summary of the beginning of the episode, thanks to Wikipedia (Btw, I never would have guessed that Wikipedia contains entries on individual Simpsons episodes…)
On an ordinary day, a bear strolls onto Evergreen Terrace. It is quickly subdued by the police, not before accidentally shooting and capturing Barney Gumble. Homer rants about these “constant bear attacks”, even though this is the very first bear Ned has seen in his forty years of living on that street. Homer then leads an angry mob and demands that Mayor Quimby do something about this. Soon, the Bear Patrol is created, a useless organization which even makes use of a B-2 Spirit. Homer then gets just as shocked [as] when he saw the bear when he discovers that taxes have been raised five dollars to maintain the Bear Patrol.
After that, the angry mob returns to the mayor’s office, yelling “Down with taxes! Down with taxes!” The mayor has to do something…
Quimby: Are those morons getting dumber or just louder?
Assistant: [Takes a moment to check his clipboard] Dumber, sir.
Quimby: They want the bear patrol but they won’t pay taxes for it. This is a situation that calls for real leadership. [Opens the door to his office to confront the angry mob.]
People, your taxes are high because of illegal immigrants!
Moe Szyslak: Immigants! I knew it was them! Even when it was the bears, I knew it was them.
Let’s not confuse fiction with reality, though. I certainly can’t believe that politicians in real life would ever raise the issue of immigration to cover up for their failures in other areas of policy, such as taxes, government spending, income inequality, education, health care…
Postscript: I’ve written in the dialogue from memory, so forgive me if it’s slightly off.