Given the adjacency matrix A of a network, we present a second-order mean-field expansion that improves on the first-order N-intertwined susceptible-infected-susceptible (SIS) epidemic model. Unexpectedly, we found that, in contrast to first-order, second-order mean-field theory is not always possible: the network size N should be large enough. Under the assumption of large N, we show that the crucial and characterizing quantity, the SIS epidemic threshold τ(c), obeys an eigenvalue equation, more complex than the one in the first-order N-intertwined model. However, the resulting epidemic threshold is more accurate: τ(c)((2)) = τ(c)((1)) + O(τ(c)((1))/N), where the first-order epidemic threshold is τ(c)((1)) = 1/λ(1)(A) and where λ(1)(A) is the spectral radius of the adjacency matrix A.