You beat me to it. Ricky's famous rant was at a dinner for the Golden Globes Awards. The remarkable thing is that he says the GG folks let him write his own jokes, say whatever he wanted, and didn't make him rehearse. Amazing. He's done five Golden Globes but never an Oscars event.
Ricky Gervais Golden Globes rant
P.S. He says he’d love to do an Oscars ceremony and would do it for free, but only if they gave him carte blanche, like the Golden Globes. Not likely.