In 1947, the long-retired Sherlock Holmes, aged 93, lives in a remote Sussex farmhouse with his housekeeper, Mrs Munro, and her young son Roger. Having just returned from a trip to Hiroshima, he starts to use jelly made from the prickly ash plant he acquired there in an effort to improve his failing memory. Unhappy about his ex-partner Watson's fictionalisation of the story of Holmes's last case, he hopes to write his own account, but is having trouble recalling the details. As Holmes spends time with Roger, showing him how to take care of the bees in the farmhouse's apiary, he comes to appreciate Roger's curiosity and intelligence and develops a paternal liking for him.
Ann Kelmot relieved her grief with a glass harmonica.
Over time, Roger's gentle prodding helps Holmes to remember the case (shown in flashbacks) and why he retired from the detective business. Almost thirty years earlier, a man named Thomas Kelmot had approached Holmes with a request to find out why his wife Ann had changed so much after suffering two miscarriages. Holmes followed Ann around London and observed her taking certain actions – forging cheques in her husband's name and cashing them, reviewing the details of his will, and buying poison from a chemist's shop – which made it appear as if she were planning to murder Thomas and inherit his property. Holmes deduced her true intentions: to have gravestones made for herself and her miscarried children, then commit suicide with the poison. Confronting her, he claimed to understand her sense of loneliness and isolation and confessed that he had those same feelings. Ann poured the poison on the ground and asked Holmes if they could share the burden of their loneliness together. Holmes, however, urged her to return to her husband. Instead, she killed herself by stepping in front of an oncoming train, whose schedules she'd also been researching. Blaming himself for her death, Holmes chose to retire.
A second series of flashbacks recounts Holmes's trip to Japan, where he met a supposed admirer named Tamiki Umezaki. Years ago, Umezaki's father had abandoned him and his mother while away in England. In a letter, Umezaki's father wrote that he was so impressed by the brilliant Sherlock Holmes that he resolved to stay in England forever. Holmes bluntly told Umezaki that his father simply wanted a new life for himself and that Holmes never met him. Umezaki was crushed by this revelation.
In the present, Mrs Munro gradually becomes dissatisfied with caring for Holmes as his overall health deteriorates, especially after he becomes unconscious from an experiment with the prickly ash and now requires more physical care than she feels able to provide. She accepts a job at a hotel in Portsmouth, planning to take Roger with her to work there as well. Roger, however, having spent considerable time with the more learned Holmes, has become dissatisfied with his uneducated mother and his family's working class status, and tension develops between mother and son.
Holmes and Mrs. Munro later discover Roger lying unconscious near the house, a victim of repeated stings, and he is rushed to a hospital. Distraught, Mrs. Munro tries to burn down the apiary, blaming Holmes for caring only about himself and his bees. Holmes stops her, having realized that Roger has been stung by wasps; Roger had found their nest and tried to drown them to protect the bees from them, but they swarmed on him instead. Holmes and Mrs Munro burn down the wasps' nest together, and Roger begins to recover. Acknowledging the value of spiritual and personal connections with others, Holmes tells Mrs Munro that she and Roger will inherit the house and grounds after his death, encouraging her to stay in the home she knows rather than move away in order to take another unrewarding job.
Finally, Holmes realizes that Watson's fictional embellishments of his last case were a sort of kindness towards Mr Kelmot, so he writes a letter to Umezaki claiming that his father actually worked secretly for the British Empire and was a brave, honorable man. As Roger begins to teach his mother how to care for the bees, Holmes emulates a tradition he saw being practiced in Hiroshima: creating a ring of stones to serve as a place where he can recall the loved ones he has lost over the years.