Why was Jesus so harsh with Nicodemus?

Jesus was not being mean-spirited, but precisely the opposite. Nicodemus needed to recognize his spiritual poverty and see his need for a Savior. And Jesus cared more for the truth than He cared about how Nicodemus felt about it. Sometimes the truth isn’t “nice”—but it’s always focused and unyielding. Before Nicodemus could receive any help from Jesus, he needed to see how desperate his situation was. When a patient has a life-threatening illness that urgently needs treatment, the physician needs to give him the bad news candidly. That was the case with Nicodemus.