Nicholas is Levin's brother. Levin and Koznyshev sneered at Nicholas when he tried to live a strict religious life (in contradiction to his passionate, lustful nature) and then they avoided him when he fell into gambling and alcohol addiction. Now, he's ill—he's sick throughout the first four parts of the novel until his untimely death in Part 4.
Nicholas is a passionate communist, but no one takes his politics very seriously. His intellectual activity, unlike Koznyshev and Levin's, seems to be mainly a distraction as he falls deeper and deeper into illness.
Nicholas's illness and death provide an opportunity for Levin to confront issues he's been grappling with. As Nicholas is dying, the tragic situation provokes a lot of worry on Levin's part about the big questions: Why are we here? What is our purpose in life? And Nicholas's illness reveals a side of Kitty that we haven't seen before. Her compassion and instinctive care for Nicholas teaches Levin a thing or two about human goodness and kindness that he didn't know before.