Nikolay is one of the men who is painting in the building when Raskolnikov kills the two women. He is first accused of the murders, then confesses to them. Arguably, his false confession is part of what drives Raskolnikov to "take credit" for his crimes.