The Duke's motive for speaking the monologue titled "My Last Duchess" is ostensibly to show his visitor part of his art collection, but it is actually to negotiate the dowry he can expect to receive when he marries "his next duchess." We do not find out the identity of his visitor or the Duke's true motive until the very end of the monologue, when the visitor has heard enough of the Duke's egotism, selfishness, greediness, and cruelty and jumps up to flee down the stairs without a word of thank-you or apology. The Duke hurries after him and tries to detain him. He says,
Will't please you rise? We'll meet
The company below, then. I repeat,
The Count your master's known munificence
Is ample warrant that no just pretence
Of mine for dowry will be disallowed;
Though his fair daughter's self, as I avowed
At starting, is my object.
The visitor is a servant of a Count and the Duke is engaged to marry that Count's daughter. The Duke brought the other man, who must be in the Count's service, upstairs to talk about money. We are only reading a part of their conversation. The Duke "avowed at starting" that he was only interested in the girl and not in money; nevertheless, he would like to have a clear understanding with the Count's representative about how much money he will receive. It looks as if he won't be getting the girl or the money, as the other man seems to intend to warn the Count against letting his daughter marry this monster at all.
That explains the Duke's motive in inviting the representative upstairs to see his art collection and talk about the dowry. It does not explain why the Duke shows his visitor the painting of his "last duchess" and spends so much time talking about that one object in his collection—especially when it sounds as if he had his young wife killed! The best explanation for this other motive is the Duke became carried away when he saw his dead wife in the portrait
Looking as if she were alive.
He sounds as if, while under the spell of his "last duchess's" beauty and the artistry of Fra Pandolf, he forgets his visitor and inadvertently confesses all his mixed feelings about the beautiful young woman in the painting. In doing this, he reveals his ugly, hateful character. All of Robert Browning's monologues are intended to reveal the character of the speaker. These include "Andrea del Sarto," "Fra Lippo Lippi," and "The Bishop Orders His Tomb at Saint Praxed's Church," which are all among Browning's most famous poems.