We introduce the notion of relative singularity category with respect to any
self-orthogonal subcategory $\omega$ of an abelian category. We introduce the
Frobenius category of $\omega$-Cohen-Macaulay objects, and under some
reasonable conditions, we show that the stable category of
$\omega$-Cohen-Macaulay objects is triangle-equivalent to the relative
singularity category. As applications, we relate the stable category of
(unnecessarily finitely-generated) Gorenstein-projective modules with
singularity categories of rings. We prove that for a Gorenstein ring, the
stable category of Gorenstein-projective modules is compactly generated and its
compact objects coincide with finitely-generated Gorenstein-projective modules
up to direct summands.