Simply put: Browning's "My Last Duchess" takes as its inspiration the life of Alfonso II of Ferrara, a Duke whose wife, Lucrezia, died rather suspiciously in the 16th century. After this happened, Alfonso pursued a second marriage to the niece of the Count of Tyrol.
In this poem, Browning imagines the Duke speaking to someone, possibly the Count of Tyrol, in an attempt to charm him with a tour of his art collection. The Duke points to a portrait on the wall of his "last duchess." He goes on to discuss his duchess as if she were a piece of art and art only; he explains that, in life, she liked everybody far too much for the Duke's liking. Rather than prizing his "gift" of having married her above others, she seemed to thank everybody equally, which the Duke found distasteful. He seemed to expect his wife to privilege him above everyone, and pay nobody else any attention.
At the end of the poem, the Duke reveals his own hypocrisy by moving on from the painting of the duchess and pointing out another piece, a bronze statue of Neptune, to his audience. It is clear that at this point the person he is speaking to has become tired of, or perhaps appalled by, the Duke. The Duke tells him that they will go downstairs together and then turns his attention to the bronze piece as if appealing to his companion to stay.