  Using the nonrelativistic QCD factorization formalism, we calculate the
electroproduction cross sections of $\eta_c$ in ep collisions, including the
contribution from both the transverse photon and the longitudinal photon. For
this process the color-singlet contribution vanishes up to the next to leading
order perturbative QCD calculations. The dominant contribution comes from the
color-octet ${}^1S_0^{(8)}$ subprocess. The nonperturbative color-octet matrix
element of ${}^1S_0^{(8)}$ of $\eta_c$ is related to that of ${}^3S_1^{(8)}$ of
$J/\psi$ by heavy quark spin symmetry, and the latter can be determined from
the direct production of $J/\psi$ at large transverse momentum at the Fermilab
Tevatron. The measurement of this process at DESY HERA can be viewed as another
independent test for the color-octet production mechanism
