You've got it a bit jumbled, but Groucho Marx said that in the 1930 Marx Brothers movie, Animal Crackers.
The exact quote is: "One morning I shot an elephant in my pajamas. How he got in my pajamas, I don't know. Then we tried to remove the tusks. The tusks. That's not so easy to say. Tusks. You try it some time. As I say, we had to remove the tusks. But they were embedded so firmly we couldn't budge them. Of course, in Alabama the Tuscaloosa, but that is entirely ir-elephant to what I was talking about."