The coercivity of a ferromagnetic material is highly dependent on the morphology and defects at the submicron scale. In this work, sub-micron grains of CoFe alloy were obtained by depositing them on the rough surface of diamagnetic MoS₂ thin films, which resulted in the coercivity being enhanced by 7 times compared to that deposited on smooth MoS2 surface. The morphologies of the MoS2 thin films were controlled by adjusting the growth temperature and deposition time. Surfaces of MoS₂ thin films with 200-nm-high nano standing walls spaced 100 nm and 250 nm apart, as well as a smooth surface with a roughness of 0.6 nm, were used. The CoFe alloys deposited on these varied surfaces exhibited significantly different ferromagnetic hysteresis behaviors. For spin valve applications, the enhanced coercivity in the soft magnet with a bilayer structure suggests a new approach to building pinned layers.