A crossbow, and a privy
Freed by his brother and armed with the truth about a woman he loved, Tyrion Lannister kills his father on the privy. Tywin's great project ÔÇö the Lannister name, immortal and untouchable ÔÇö dies with him in the least dignified room in the Red Keep, and the realm's last competent hand lets go of the reins.
The fuller tale
Tywin Lannister had spent forty years making his name mean something. He had put down the Reynes and Tarbecks so thoroughly that the song about it is still used as a threat; he had ruled the realm for two kings; he had married his daughter to one and his grandson to the throne, and had just won a war by having someone else break guest right.
His younger son, whom he had never once acknowledged as his, was in a black cell waiting to be executed for a murder he had not committed. His elder son let him out. On the way to the ship Tyrion turned aside and went up the Tower of the Hand, because he had learned something on the stair that he could not walk past.
He found the woman he had loved, whom his father had had used and then handed to the guards and then to a king, in his father's bed. He killed her with his hands. Then he took a crossbow to the privy, where Tywin was sitting, and had the last conversation the two of them would ever have, and ended it because Tywin would not stop saying the word he had used about her.
The Lannister name
Tywin's entire life's work was the family, and it was undone by the family in a single night. He died on a privy with his bowels opened, and the smell of it in the Great Sept afterward was the subject of jokes in the city within a week, which is the one thing he would have found unbearable.
What he left behind was a daughter with all his ruthlessness and none of his judgement, a son who could not hold the west, another in exile, an empty treasury he had been hiding, and enormous debts to the Iron Bank of Braavos and the Faith. The realm's last competent Hand let go of the reins and nobody able picked them up.
Elsewhere in the wiki
 See the world as it stood in 300 AC What became of it  if an ending is written, it is here. Spoilers.
The chronicle records no ending here ÔÇö or none the maesters have set down.