In this paper, we introduce a class of self-adjoint operators that contain the left- and right-sided general fractional derivatives with the Sonin kernels. Then the fractional Sturm-Liouville problem with these operators and the boundary conditions in terms of the left- and right-sided general fractional derivatives and integrals is investigated. In particular, we show that the eigenvalues of the fractional Sturm-Liouville problem are real numbers and the eigenfunctions corresponding to distinct eigenvalues are orthogonal under a weighted scalar product. Finally, we discuss a particular case of the fractional Sturm-Liouville problem and deduce its solution in terms of the fractional Chebyshev functions.