The story opens with Denis Grigoryev, a small and poor peasant, standing before the magistrate. The magistrate invites Denis to come forward and answer his questions. It was reported by a railway watchman, Ivan Semyonovich Akinfov, that in July of that year Denis was unscrewing a nut by which rails are made fast to the sleepers. The magistrate is interested in Denis's reasoning behind this action.
Denis is a simple, uneducated man, and answers the questions in such manner that the magistrate often feels he is being made a fool out of. Eventually, Denis admits he did unscrew the nut, because everyone in his village does that. The peasants use the nuts as weights for fishing and it does not occur to them that their actions could cause serious accidents. After the hearing, the magistrate decides that Denis should go to prison. Denis does not understand why he should be imprisoned, because in his eyes, he did not do anything that would deserve such a severe punishment. At the end, he is take to prison.