This paper focuses on the issue of achieving transmit diversity for the multiple-input multiple-output orthogonal frequency division multiplexing (MIMO-OFDM) system working with quadrature index modulation (QIM). Inspired by the ideas of quadrature spatial modulation (QSM) and quadrature space-frequency index modulation (QSF-IM), parts of the space-frequency resource units in each resource block (RB) of the MIMO-OFDM system are activated twice independently to send the in-phase and quadrature components of a space-frequency code, respectively, to achieve the second order transmit diversity. Thus the proposed scheme is called space-frequency coded QIM (SFC-QIM). The SFC-QIM scheme allows for a linear-complexity maximum likelihood (ML) receiver, which benefits from the orthogonality between the real and imaginary parts of the symbols in the SFC codewords. Owing to obtaining higher diversity order, simulation results of bit error rate (BER) performance demonstrate that the new SFC-QIM scheme outperforms some existing IM schemes in both independent and identically distributed (i.i.d.) and correlated Rayleigh fading channels.