We consider the gluon fusion production cross section of a scalar Higgs boson in models where fermion and scalar massive colored particles are present. We report analytic expressions for the matrix elements of gg → Hg, qq → Hg, and qg → Hq processes completing the calculation of the NLO QCD corrections in these extended scenarios. The formulas are written in a complete general case, allowing a flexible use for different theoretical models. Applications of our results to two different models are presented: i) a model in which the SM Higgs sector is augmented by a weak doublet scalar in the SU (N c ) adjoint representation. ii) The MSSM, in the limit of neglecting the gluino contribution to the cross section.