Quantum simulators offer the potential to utilize the quantum nature of a physical system to study another physical system. In contrast to conventional simulation, which experiences an exponential increase in computational complexity, quantum simulation cost increases only linearly with increasing size of the problem, rendering it a promising tool for applications in quantum chemistry. The variational-quantum-eigensolver algorithm is a particularly promising application for investigating molecular electronic structures. For its experimental implementation, spin-based solid-state qubits have the advantage of long decoherence time and high-fidelity quantum gates, which can lead to high accuracy in the ground-state finding. This study uses the nitrogen-vacancy-center system in diamond to implement the variational-quantum-eigensolver algorithm and successfully finds the eigenvalue of a specific Hamiltonian without the need for error-mitigation techniques. With a fidelity of 98.9% between the converged state and the ideal eigenstate, the demonstration provides an important step toward realizing a scalable quantum simulator in solid-state spin systems.