He (Tyrion) deliberately pours away the residue left over in the wine cup which could have been analysed for poisons. This in turn could have helped his case.
So why did he throw it away?
I think he simply wanted to remove the deadly poison from the drinking receptacle - a reasonable "first responder" precaution. You know, "better that nobody else drink that."
I don't think Tyrion foresaw that he would be blamed for it, and figured that the best possible outcome for the realm (and, really, everyone) would be to have the event chalked up as an accident or fate, rather than an assassination, because the latter would most likely cause yet another war.
I've been back over the chapter and this is the paragraph where he pours out the wine:
Tyrion found himself thinking of Robb Stark. My own wedding is looking much better in hindsight. He looked to see how Sansa was taking this, but there was so much confusion in the hall that he could not find her. But his eyes fell on the wedding chalice, forgotten on the floor. He went and scooped it up. There was still a half-inch of deep purple wine in the bottom of it. Tyrion considered it a moment, then poured it on the floor.
My thought is that, upon thinking about Robb Stark, and then Sansa, he was probably considering that Joffrey dying was probably justice for his wife. He didn't know that she was trying to escape, so he was hoping to provide her with the best life possible, and Joffrey not being in it would certainly help that to happen.
At this point in time, everyone still believes that Joffrey is choking on the pie, it is only Cersei that jumps to the conclusion of poison right away. I'm guessing that he thought Joffrey, or someone on his behalf, might still want to try to use the wine to dislodge the pie stuck in his throat, so he poured it away giving him nothing to drink.
It would explain why he felt some semblance of guilt over Joffrey's death. Whilst he actually had nothing to do with the poisoning, he still wanted Joffrey to die.
I think he was trying to see if there would be anything left at the cup's bottom that could explain what was happening to his beloved Nephew.