In Chapter Four of the story, the Duke of Cheshire comes to spend one week of the holidays at Canterville Chase. On his arrival, the ghost is tempted to dress up as "The Vampire Monk," one of his "celebrated" impersonations, to scare the young Duke. This is because the Canterville ghost had once terrified the young Duke's grand-uncle, Lord Francis Stilton, in a display which became so infamous that it had to be "hushed up." As such, the Canterville ghost is keen to show that he has not "lost his influence" over the Stilton family.
After making his preparations, however, the ghost gives up the idea of scaring the young Duke when he realises that he might meet with the twins, if he leaves his room. It is, therefore, his fear of the twins and fear of being humiliated which stops him in his tracks.