In the book, Denethor is portrayed as strong-willed, stern, powerful, proud and intelligent. Gandalf warns Pippin that "It is difficult to deceive him, and dangerous to try." He looks old, but it is said that he was aged before his time through mental battles with Sauron. He seems cold, but does have a sense of humour that shows from time to time. He is also clearly devoted to Gondor, but also jealous of the love of his sons and people; this makes him especially suspicious of Gandalf, who he suspects of simply using him as a shield while bringing in someone else to supplant him. Denethor is capable of making decisions and leading Gondor for most of the War, only losing control at the end due to despair caused by visions in the Palantir as well as the death of Boromir and the wounding of Faramir.
He shows obvious favouritism towards Boromir, in part because he believes he could trust him more as Faramir is very close to Gandalf. However, he is obviously distressed at Faramir's near-fatal injury and regrets sending him "unthanked, unblessed, out into needless peril." He insists on staying by Faramir's bed in case he says anything before he dies, and when Faramir calls out for him he weeps and looks on him with longing, showing that he does indeed love him.
Denethor is angry with Faramir for not bringing the Ring back to Minas Tirith after meeting Frodo in Ithilien, and says that Gandalf is a fool for sending it away. He believes that the Ring would be safest in the vaults of Minas Tirith, unused, and trusts himself to stand the test of having and not using it, "unless at the uttermost end of need," but he acknowledges that to use it is perilous. He quickly accepts, however, that nothing more can be done.
Over the years, possibly beginning with the early death of his wife Finduilas, Denethor secretly uses a Palantir. Sauron is aware of this and is able to control what Denethor sees, thus filling his heart with despair, especially during the later days of the War. This, combined with the death of Boromir and apparent fatal wounding of Faramir, causes Denethor to lose all hope of victory and decide that if he is to die, he will do so on his own terms. He therefore orders his servants to lay Faramir on a pyre and cover them both with oil, then set light to them.
Fortunately, Pippin warns Beregond of what is happening, and Beregond is able to stop the servants setting light to the pyre until Pippin can fetch Gandalf, who then rescues Faramir. Denethor refuses to live serving another, whether Sauron or Aragorn, and reveals the Palantir, telling Gandalf that his hope is in vain and that even now Sauron's army is receiving reinforcements. He then sets light to the pyre himself and lays down on it, still holding the Palantir, and thus dies.
In the film, Denethor seems insane from his first appearance. He has also become notable for his bad table manners, as the film shows repeated close-ups of him eating messily. He has lost the military skill and leadership that he demonstrated in the books, as he refuses to summon help even though Gondor is in need of it; unlike in the books, he has not lit the beacons to summon the aid of Rohan by the time Gandalf and Pippin arrive, and he refuses to do so, making it necessary for Gandalf to secretly send Pippin to light them. He also appears surprised when he sees the armies of Mordor drawing near and immediately orders his men to abandon their posts. Gandalf knocks him unconscious with his staff and takes over command, as he is clearly incompetent. This is part of a pattern of treating Denethor as something of a joke.
Denethor still shows obvious favouritism towards Boromir. In the film he goes somewhat further than in the book, as he says outright that he would have preferred Boromir to live and Faramir to die, while in the book he simply said that he wished their places had been exchanged, which has a more ambiguous meaning. Denethor is also clearly indifferent to Faramir's danger having sent him to attempt to recapture Osgiliath, as this is when he eats his dinner (spraying juice from tomatoes as he bites into them and allowing symbolic red liquid to run from his mouth) having ordered Pippin to sing for him (which he did not do in the book, instead discussing Rohan with Gandalf). He reacts with hysterics when Faramir is brought back wounded, but the film does not include the long vigil by Faramir's sickbed. However, as Denethor burns, Faramir recovers consciousness long enough to look at him, and Denethor's expression is one of love as he calls Faramir's name. The reasons behind Denethor's favouritism are not explored, leaving the impression that he just disliked Faramir.
Denethor deliberately sent Boromir to Rivendell with the intention that Boromir would bring back the Ring, implying that he intends to use it, as "our need is great. It is our blood which is being spilled, our people who are dying. Sauron is biding his time. He’s massing fresh armies. He will return. And when he does, we will be powerless to stop him." He sends Boromir because he believes he would be strong enough to resist the Ring. Later, he remarks that he would not use the Ring, "Unless at the uttermost end of need," as in the book.
The Palantir does not appear in the film, so there is no explanation for Denethor's madness and despair.
As in the book, Denethor attempts to burn himself and Faramir alive, but is interrupted by Gandalf and Pippin. Gandalf knocks Denethor off the already-burning pyre with his staff and Pippin rolls Faramir off. Denethor then attacks Pippin and Shadowfax knocks Denethor onto the pyre. Gandalf, Pippin and Denethor's servants then stand by as Denethor catches fire, runs out of the Hallows and off the end of the courtyard in the Citadel. This scene has led to one of the PPC's most well-known expressions of surprise.
Denethor is an abusive father who doesn't care one whit about Faramir, or in extreme cases, about either of his sons. He could also be one for indulging in incest, and is occasionally seen physically and/or sexually abusing Peregrin Took.