We consider a class of Jacobi matrices with unbounded entries in the so called critical (double root, Jordan box) case. We prove a formula for the spectral density of the matrix which relates its spectral density to the asymptotics of orthogonal polynomials associated with the matrix.