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?
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
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.