This is the classic internal power struggle as described by Mr. Freud. Freud said that there were three parts of the human psyche: the Id, the Ego, and the Superego. The interactions of these three sections of the mind result in such things as guilt complexes as well as addiction. This can also be used to compare the three most prominent characters in a book in a form of literary criticism known as the "pyschological method."
The Id is often referred to as the "pleasure principle." It deals with such primal instincts and emotions as lust, wrath and greed. All in all, Id is not such a nice fellow, although he is needed to balance out the other two members. As you will soon see, any one of the three members, when taken to excess, is dangerous.
The Superego is essentially the composite of the values imposed on an individual by the society in which he lives. Just as an over-active Id creates murderers and rapists, an overly-active Superego can create guilt-complexes and religious mania.
The Ego is simply the section of the mind that connects the Id and the Superego. A lack of an Ego is also dangerous, becasue the person is incredibly instable, and may develop multiple personalities depending on whether he is leaning more towards the Id or the Superego on any given day.
The "psychological method" when applied to Melville's Moby Dick described the revenge-bent captain as Id, the rational second-in-command as the Ego, and the white whale as the rampaging Christian society that was prominent at the time Melville wrote this book.