Inspired by the newly discovered isomeric states in the rare-earth neutron-rich nuclei, high-$K$ isomeric states in neutron-rich samarium and gadolinium isotopes are investigated within the framework of the cranked shell model (CSM) with pairing correlation treated by a particle-number-conserving (PNC) method. The experimental multi-particle state energies and moments of inertia are reproduced quite well by the PNC-CSM calculations. A remarkable effect from the high-order deformation $varepsilon_{6}$ is demonstrated. Based on the occupation probabilities, the configurations are assigned to the observed high-$K$ isomeric states. The lower $5^-$ isomeric state in $^{158}$Sm is preferred as the two-proton state with configuration $pifrac{5}{2}^{+}[413]otimespifrac{5}{2}^{-}[532]$. More low-lying two-particle states are predicted. The systematics of the electronic quadrupole transition probabilities, $B(E2)$ values along the neodymium, samarium, gadolinium and dysprosium isotopes and $N=96,98,100,102$ isotones chains is investigated to reveal the midshell collectivities.