Magwitch—the thief with a heart of gold—never had a chance. His first memory is of stealing turnips (which is just sad—not only does he have to steal food as a kind, but he has to steal turnips), and it never really gets better. He has a rap sheet a mile long; he's been in and out of juvie; and eventually he gets shipped off to Australia, where England used to send its convicts. It's no surprise to anyone that he ends up dying in jail.
But what happens in between—well, that is a little surprising. Because he makes a fortune—and he gives it all to the little boy who brought him food years ago on the marsh.
Let's get this out of the way. Magwitch is gross. He's dirty, sloppy, and rude, eating "in a ravenous way that was very disagreeable, and all his actions were uncouth, noisy, and greedy" (40.46). He's missing some teeth, and even in the clothes of a "prosperous farmer" he looks like a "Prisoner, Felon, Bondsman" (40.107).
But—and bear with us—we have to admire him. He teaches himself to read and write, and, unlike any other wealthy character in the book, he's a self-made man. He gets rich through hard work and "living rough" (and probably a little bit of good luck, too). And everything he gets, he gives to Pip.
He even thinks of Pip as a son, or as "more to me nor any son" (39.67). We get the first hint that he might be more than a hardened criminal at the very beginning of the novel, on the marsh, when he thanks Pip for bringing him food and "smear[s] his ragged rough sleeve over his eyes" (21).
But no matter what, Magwitch isn't a gentleman—partly because he still believes that gentlemanliness is something that can be bought. He tells Pip that "If I ain't a gentleman, nor yet ain't got no learning, I'm the owner of such. All on you owns stock and land; which on you owns a brought-up London gentleman?" (39.78). In other words, Magwitch thinks of Pip as "his" gentleman, just as Pip thinks of Magwitch as "his" convict.
Only, here's the thing: if Magwitch had never revealed himself to Pip, wouldn't that be more or less true? Pip would never know that his fortune came from a criminal, and he really would be a gentleman. It's almost like a money laundering scheme: by pouring his wealth into Pip, Magwitch would be cleaning up his money and leaving a gentlemanly legacy.
The dirty little secret is that a lot of so-called "gentlemen" in the nineteenth century really did come from less-than-savory ancestors; that's part of a long history of the word "gentleman" coming to mean someone who acts a certain way rather than someone who belongs to a certain class. Magwitch is doing just what any other socially mobile hard-working man would do—trying to make sure his son just a little better educated and little classier than he is.
He may be an uncouth criminal, but he really is like a father to Pip, and he really does make Pip into a gentleman. In some ways, he's an even better father than Joe. And he really is a father, too: one of the book's big surprises is that Magwitch is Estella's dad. Whoa!