At some point during the wedding feast, Joffrey’s wine is poisoned. After deeply drinking wine from the wedding chalice, and eating several handfuls of the pie, Joffrey begins to cough, each one more violent than the last. Joffrey points at Tyrion in his dying moments; Tyrion empties the remainder of the chalice on the floor. After Joffrey is confirmed dead, his mother, Cersei Lannister, orders the arrest of Tyrion.

source