A complete effective Hamiltonian for relativistic corrections at orders $malpha^6$ and $malpha^6(m/M)$ in a one-electron molecular system is derived from the NRQED Lagrangian. It includes spin-independent corrections to the energy levels and spin-spin scalar interactions contributing to the hyperfine splitting, both of which had been studied previously. In addition, corrections to electron spin-orbit and spin-spin tensor interactions are newly obtained. This allows improving the hyperfine structure theory in the hydrogen molecular ions. Improved values of the spin-orbit hyperfine coefficient are calculated for a few transitions of current experimental interest.