We study a two-qutrit system which is described by the Bose–Hubbard Hamiltonian with two external magnetic fields. The entanglement (through the negativity) and quantum correlation (through the geometric discord) between the qutrits are calculated as functions of the magnetic field (B), the temperature (T), the linear and nonlinear coupling constants among two spins (J and K). Then, we compare the effect of these parameters on entanglement and quantum correlation of this system. For some values of system parameters, we show that the negativity is zero while, the geometric discord is nonzero. Moreover, we investigate the effect of finite external magnetic fields direction on these measures. This study leads to some new and interesting results as well.