  A $\mathbb Q$-Fano variety is a normal $\mathbb Q$-factorial projective
variety with Picard number one whose anti-canonical divisor is ample. In this
paper, we prove a Kawamata--Miyaoka type inequality \[ c_1(X)^n< 4
c_2(X)c_1(X)^{n-2} \] for any canonical $\mathbb Q$-Fano variety $X$ of
dimension $n$ which is smooth in codimension two. We also prove a stronger
inequality for terminal $\mathbb{Q}$-Fano threefolds.
