A carpenter has given the speaker a blackbird, a bird meant to whistle inside the house. At first the gesture sounds kind, and the speaker admits the song is "so pleasant to hear." But the poem turns quickly. Outside, nightingales are singing freely, and against that sound the speaker notices the caged bird "shuffling" around, and the pleasure sours into pity.
The last lines carry the poem's real feeling. Calling the bird "the poor thing" shows sympathy, and the idea that its whistling is a riff "on a life sentence" makes the song sound less like happiness and more like a prisoner making the best of confinement. The speaker seems uneasy, caught between enjoying the music and recognizing what it costs the bird. The mood is quiet, wry, and a little guilty. Nothing dramatic happens, but the contrast between the indoor whistle and the wild singing outside leaves a lingering sadness about beauty that is kept rather than shared.