We present a complete evaluation for the prompt $eta_c$ production at the LHC at next-to-leading order in $alpha_s$ in nonrelativistic QCD. By assuming heavy quark spin symmetry, the recently observed $eta_c$ production data by LHCb results in a very strong constraint on the upper bound of the color-octet long distance matrix element $1S0$ of $J/psi$. We find this upper bound is consistent with our previous study of the $J/psi$ yield and polarization and can give good descriptions for the measurements, but inconsistent with some other theoretical estimates. This may provide important information for understanding the nonrelativistic QCD factorization formulism.