Magwitch is really sick. Two of his ribs are broken and his lung is punctured. He can't breathe well and he can't speak.
Pip visits him every day, and every day Magwitch looks worse and worse.
Jaggers tries to postpone Magwitch's trial but to no avail.
The trial comes, and Pip is allowed to stand next to Magwitch and to hold his hand.
He's totally freaked out by the trial, because it feels like a show or a spectacle. Over thirty convicts and criminals who are to receive the death penalty stand in the courtroom while lots of onlookers gather in the rows and in the balconies.
Each person's death sentence is read. Magwitch's death sentence is really long, because he's been convicted of so much in his life.
Pip is outraged and tries to petition to overrule the death sentence, but no politician responds to his letters.
Between his visits to Magwitch's jail cell, Pip wanders the London streets in the April weather, trying to figure out how he can acquit his good friend.
But it's no good. In the end, Magwitch is dying—but before he does, Pip tells Magwitch that his daughter is alive, that she's a beautiful lady, and that she's loved by Pip.
Magwitch kisses Pip's hand, a peaceful look washes over him, and he passes away.
Upon realizing he's dead, Pip utters, "O Lord, be merciful to him a sinner!" (4.56.35).