The action takes place in the late 1930s. 30-year-old Mary Panton, whose extraordinary beauty has always been one of her greatest assets, has been a widow for one year. Her late husband Matthew, whom she married at 21 because she loved him, turned out to be an alcoholic, a gambler, a womaniser, and a wife-beater. Mary endures all the hardship and pain inflicted on her by her husband (including his having sex with her while drunk). When he drinks and drives, he has a car accident. A few hours later, he dies in Mary's arms. This, she concludes, is a blessing for both of them.
The Leonards (a couple who are not in the novel) offer Panton their 16th-century villa on a hill above Florence, Italy, for an extended stay. She gladly accepts the offer. The old villa is staffed by Nina, the maid, and Ciro, her husband and manservant—but it is otherwise empty. Mary, whose parents are both dead, enjoys the solitary life up at the villa. Occasionally, she joins other residents of, and visitors to, Florence for a party or luncheon. She enjoys driving round the countryside in her car. So far as a widow she has not taken a lover. She says it has been an easy decision as she has never been tempted.
During dinner at a restaurant with some of her acquaintances—among them the old Princess San Ferdinando, an American who is said to have been a "loose woman" in her day—they listen to a young man playing the violin. He is dressed in folkloric clothes and does not play well. At the end of the evening, the Princess tries to set Mary up with Rowley Flint, a young Englishman of independent means and risky reputation, by asking her to give him a lift back to his hotel. Flint makes a pass at her, but she rejects him, and laughs, even when he proposes to her.
After she has dropped him off, Mary drives back home. On her way, although it is late at night, she stops to have a look at the scenery. She senses someone nearby and learns that it is Karl Richter, the fiddler from the restaurant, who is also admiring the view. They begin to talk, and Mary learns that he is a 23-year-old Austrian art student who has fled his country because of Nazi persecution. Without a passport or documents, he is staying as an illegal immigrant in a rented room near the Leonards' villa.
Mary takes pity on Richter, and invites him to look at the paintings in the villa. Learning he had gone without dinner, Mary fixes him some bacon and eggs. They have wine with their improvised meal. They end up in bed.
When Mary thinks it is time for Richter to leave and the latter, to her dismay, asks when he will be able to see her again, the idyll quickly deteriorates. Mary remembers the revolver her suitor, 54-year-old Sir Edgar Swift, has forced upon her as a means of protection. When Richter starts threatening her, she pulls it out and aims it at him. She cannot pull the trigger and advises him to try and escape to Switzerland.
After she tells him she slept with him from pity, Richter attacks her verbally. He picks her up and throws her on her bed, before covering her face with kisses. She tries to get away from him but he overpowers her. Seized with remorse over what he sees as the impossibility of life since escaping his homeland, Richter says, "You asked me not to forget you. I shall forget, but you won't." He shoots himself through the breast with Swift's gun.
The maid Nina hears the shot and comes to the bedroom door. Mary panics and sends her away. She phones Flint and asks him to help her. Mary is prepared to accept full responsibility for her actions. But Flint suggests they try to dispose of the body.
They put the body in the car and drive out into the country, where he dumps it. A car full of drunk Italians approaches and must slow to try to pass. When the party see Mary and Flint embracing each other as they pretend to be lovers, they start singing "La donna è mobile" and drive on. The next morning, Flint returns and leaves the revolver with Richter's body.
Mary sleeps almost until noon. She has an invitation for luncheon, and Flint has urged her not to show any signs of panic or fear, so she attends it. Her guilty conscience is her constant companion.
Sir Edgar Swift, who has known her and her parents since she was a little child, arrives, planning to renew his suit since she was widowed. He had told her of an impending promotion to a high government post in colonial India and his need for a suitable wife. He proposes to Mary before a short trip to Cannes on urgent government business. Mary tells him she will give him an answer when he returns.
Mary confesses everything when Swift returns. He says that he forgives her and that he still wants to marry her. But, he says he must give up the promised post because of the risk of her past being exposed. He suggests that he can retire, they will marry and move to the French Côte d'Azur. Mary, finally says that she does not love him and could not be around him all the time.
After Swift has left, Flint turns up at the villa. When he mentions owning an estate in Kenya, and having read Dr Johnson, he appears more attractive. Agreeing with him that life is about taking risks, Mary decides to accept his proposal.
The novella was adapted as the 2000 film Up at the Villa, directed by Philip Haas. The movie starred Kristin Scott Thomas, Anne Bancroft, James Fox, Derek Jacobi, and Sean Penn. In the film, subplots were added to expand the material to feature film length, which reviewers and cinemagoers criticised.
Somerset Maugham donated the manuscript of Up at the Villa to Rupert Hart-Davis to sell in 1960 to raise money for the London Library; it sold for £1,100.