This paper proposes a subspace identification method involving a priori knowledge characterized as the moment of the transfer function. First, it is shown that any moment defined on the complex plane is expressed in terms of the solution to a Sylvester matrix equation with real-valued coefficients. Then, incorporating the Sylvester equation with the conventional subspace method, we formulate a moment-constrained subspace identification problem. Application of a proper weight reduces the constrained identification problem to a non-constrained quadratic programming. Finally, we propose a two-stage identification procedure: First, in the preliminary identification stage, the moments are estimated by using a specific input signal. Then, in the main identification stage, a state-space model is constructed based on the proposed identification method using the measured input-output data and the estimated moments. The effectiveness of the two-stage procedure is shown in a numerical simulation.