We theoretically study the optical second-order sideband (OSS) generation in a hybrid cavity optomechanical system, which consists of an optomechanical cavity trapping a nitrogen-vacancy (NV) spin ensemble and an auxiliary cavity. Compared with ordinary optomechanical system, the results show that the OSS generation is more obvious in both red probe-pump resonant detuning case and blue one when NV spin ensemble is coupled to the optomechanical cavity. Besides, the significant improvement of OSS efficiency can be realized by tuning the collective spin-cavity coupling and the spin-pump detuning. By optimizing the collective spin-cavity coupling strength and the spin-pump detuning together, the efficiency of OSS can be higher than that of first-order sideband. Moreover, we demonstrate that the OSS efficiency can be modulated effectively by the decay rate of NV spin ensemble. Meantime, it is proved that the tunnelling strength between the optomechanical cavity and auxiliary cavity also plays a dispensable role on the OSS generation. Interestingly, in the red probe-pump resonant case, the OSS efficiency undergoes a process of first deceasing and then increasing as the tunnelling strength increases. These results provide some guidance for enhancing OSS efficiency and controlling light propagation, which facilitates the practicable applications in optical communication and storage.