Pip's visitor arrives in Chapter XXXIX. At first Pip does not recognize him but only sees that he is a rough-looking elderly man whose poor English marks him as a member of the lowest class of society. Pip feels apprehensive when he realizes that this is the same man he helped many years ago when the man was a convict who had escaped from a prison ship and was hiding on the marshes. Pip naturally assumes that the man has come there to thank him. He is anxious to get rid of this unwelcome visitor but feels obliged to offer him a drink because he is soaked from being out on such a stormy night. Then the visitor asks him several questions which lead Pip to the horrible realization that it is his visitor and not Miss Havisham who has been providing for him for all these years. Pip is not only revolted to realize that he owes everything to this criminal, but he is utterly disillusioned and desolated to realize that all his ideas about Miss Havisham being his unknown benefactress were totally wrong. He had thought she wanted to make him into a gentleman so that he could marry Estella.
The visitor, whose name turns out to be Abel Magwitch, had returned to England for the sole purpose of meeting the gentleman he has created with the fortune he made in Australia raising sheep and speculating in various investments. It becomes more and more apparent that Magwitch wants a permanent relationship with Pip, like a loving father with an equally loving son. Pip hides his feelings from Magwitch but confesses them to the reader.
The abhorrence in which I held the man, the dread I had of him, the repugnance with which I shrank from him, could not have been exceeded if he had been some terrible beast.
It seems pathetic and ironic that Magwitch has such affection for Pip and Pip feels such loathing for Magwitch. The "abhorrence" and "repugnance" Pip expresses in the above quote are those that he continues to feel at the end of the chapter. He puts Magwitch in Herbert's room for the night and locks the bedroom door from the outside, because in addition to his other feelings about his guest, Pip is afraid the man might decide to murder him in his sleep.
Pip does not get much sleep that night. He is tormented by all kinds of thoughts and feelings. He is desolated at the realization that his hopes of marrying Estella and living a life of leisure and happiness on Miss Havisham's money have been destroyed. He is just beginning to understand that his future as a London gentleman is dependent on the money he gets from a man who wants to be his second father. If he rejects Magwitch, he naturally loses his entire income. He would become destitute overnight--and worse than destitute because he has incurred a lot of debts and could be sent to debtor's prison if he defaulted. He has been turned into Magwitch's idea of a "gentleman." He is a useless fop, like most London gentlemen. He has no training for any kind of trade or profession by which he could support himself. He has nothing but good clothes, refined manners, and cultivated tastes. He may remain entirely dependent upon the man who, in a sense, "created" him and feels entitled to become his permanent companion and "second father."
Pip also feels responsible to Magwitch because the elderly man tells him that he is sure to be hanged if captured for the crime of returning to England after having been transported to Australia.
Nothing was needed but this; the wretched man, after loading wretched me with his wretched gold and silver chains for years, had risked his life to come to me, and I held it there in my keeping! If I had loved him instead of abhorring him; if I had been attracted to him by the strongest admiration and affection, instead of shrinking from him with the strongest repugnance; it could have been no worse.